winloong
2 years ago
51 changed files with 87735 additions and 0 deletions
@ -0,0 +1,117 @@ |
|||
/* |
|||
* Copyright 2007-present the original author or authors. |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); |
|||
* you may not use this file except in compliance with the License. |
|||
* You may obtain a copy of the License at |
|||
* |
|||
* https://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, |
|||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|||
* See the License for the specific language governing permissions and |
|||
* limitations under the License. |
|||
*/ |
|||
import java.net.*; |
|||
import java.io.*; |
|||
import java.nio.channels.*; |
|||
import java.util.Properties; |
|||
|
|||
public class MavenWrapperDownloader { |
|||
|
|||
private static final String WRAPPER_VERSION = "0.5.6"; |
|||
/** |
|||
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. |
|||
*/ |
|||
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" |
|||
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; |
|||
|
|||
/** |
|||
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to |
|||
* use instead of the default one. |
|||
*/ |
|||
private static final String MAVEN_WRAPPER_PROPERTIES_PATH = |
|||
".mvn/wrapper/maven-wrapper.properties"; |
|||
|
|||
/** |
|||
* Path where the maven-wrapper.jar will be saved to. |
|||
*/ |
|||
private static final String MAVEN_WRAPPER_JAR_PATH = |
|||
".mvn/wrapper/maven-wrapper.jar"; |
|||
|
|||
/** |
|||
* Name of the property which should be used to override the default download url for the wrapper. |
|||
*/ |
|||
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; |
|||
|
|||
public static void main(String args[]) { |
|||
System.out.println("- Downloader started"); |
|||
File baseDirectory = new File(args[0]); |
|||
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); |
|||
|
|||
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
|||
// wrapperUrl parameter.
|
|||
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); |
|||
String url = DEFAULT_DOWNLOAD_URL; |
|||
if(mavenWrapperPropertyFile.exists()) { |
|||
FileInputStream mavenWrapperPropertyFileInputStream = null; |
|||
try { |
|||
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); |
|||
Properties mavenWrapperProperties = new Properties(); |
|||
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); |
|||
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); |
|||
} catch (IOException e) { |
|||
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); |
|||
} finally { |
|||
try { |
|||
if(mavenWrapperPropertyFileInputStream != null) { |
|||
mavenWrapperPropertyFileInputStream.close(); |
|||
} |
|||
} catch (IOException e) { |
|||
// Ignore ...
|
|||
} |
|||
} |
|||
} |
|||
System.out.println("- Downloading from: " + url); |
|||
|
|||
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); |
|||
if(!outputFile.getParentFile().exists()) { |
|||
if(!outputFile.getParentFile().mkdirs()) { |
|||
System.out.println( |
|||
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); |
|||
} |
|||
} |
|||
System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); |
|||
try { |
|||
downloadFileFromURL(url, outputFile); |
|||
System.out.println("Done"); |
|||
System.exit(0); |
|||
} catch (Throwable e) { |
|||
System.out.println("- Error downloading"); |
|||
e.printStackTrace(); |
|||
System.exit(1); |
|||
} |
|||
} |
|||
|
|||
private static void downloadFileFromURL(String urlString, File destination) throws Exception { |
|||
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { |
|||
String username = System.getenv("MVNW_USERNAME"); |
|||
char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); |
|||
Authenticator.setDefault(new Authenticator() { |
|||
@Override |
|||
protected PasswordAuthentication getPasswordAuthentication() { |
|||
return new PasswordAuthentication(username, password); |
|||
} |
|||
}); |
|||
} |
|||
URL website = new URL(urlString); |
|||
ReadableByteChannel rbc; |
|||
rbc = Channels.newChannel(website.openStream()); |
|||
FileOutputStream fos = new FileOutputStream(destination); |
|||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); |
|||
fos.close(); |
|||
rbc.close(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,2 @@ |
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip |
|||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar |
@ -0,0 +1,10 @@ |
|||
FROM openjdk:8-jdk |
|||
|
|||
MAINTAINER cheeyy |
|||
|
|||
WORKDIR /app |
|||
|
|||
COPY ./target/camunda-service.jar /app/camunda-service.jar |
|||
|
|||
ENTRYPOINT [ "java", "-jar", "camunda-service.jar" ] |
|||
|
@ -0,0 +1,53 @@ |
|||
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: anxinyun-camunda-workflow |
|||
namespace: anxinyun |
|||
labels: |
|||
app: cwprocess |
|||
spec: |
|||
selector: |
|||
matchLabels: |
|||
app: cwprocess |
|||
replicas: 1 |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: cwprocess |
|||
spec: |
|||
containers: |
|||
- name: anxinyun-camunda-workflow |
|||
image: repository.anxinyun.cn/anxinyun/camunda-workflow:dragon.1 |
|||
command: [ "java", "-jar", "camunda-service.jar" ] |
|||
args: [ "--spring.datasource.driver-class-name=org.postgresql.Driver","--spring.datasource.url=jdbc:postgresql://10.8.30.39:5432/camunda","--spring.datasource.username=FashionAdmin","--spring.datasource.password=123" ] |
|||
volumeMounts: |
|||
- name: hostfile |
|||
mountPath: /etc/hosts |
|||
- name: localtime |
|||
mountPath: /etc/localtime |
|||
volumes: |
|||
- name: hostfile |
|||
hostPath: |
|||
path: /etc/hosts |
|||
- name: localtime |
|||
hostPath: |
|||
path: /etc/localtime |
|||
imagePullSecrets: |
|||
- name: anxinsecret |
|||
--- |
|||
apiVersion: v1 |
|||
kind: Service |
|||
metadata: |
|||
name: anxinyun-camunda-workflow |
|||
labels: |
|||
app: cwprocess |
|||
namespace: anxinyun |
|||
spec: |
|||
type: ClusterIP |
|||
ports: |
|||
- port: 19094 |
|||
targetPort: 8080 |
|||
selector: |
|||
app: cwprocess |
|||
externalIPs: |
|||
- 10.8.30.157 |
@ -0,0 +1,179 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
|||
<component name="FacetManager"> |
|||
<facet type="Spring" name="Spring"> |
|||
<configuration /> |
|||
</facet> |
|||
<facet type="web" name="Web"> |
|||
<configuration> |
|||
<webroots /> |
|||
<sourceRoots> |
|||
<root url="file://$MODULE_DIR$/src/main/java" /> |
|||
<root url="file://$MODULE_DIR$/src/main/resources" /> |
|||
</sourceRoots> |
|||
</configuration> |
|||
</facet> |
|||
</component> |
|||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> |
|||
<output url="file://$MODULE_DIR$/target/classes" /> |
|||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
|||
<content url="file://$MODULE_DIR$"> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
|||
<excludeFolder url="file://$MODULE_DIR$/target" /> |
|||
</content> |
|||
<orderEntry type="jdk" jdkName="jdk1.8" jdkType="JavaSDK" /> |
|||
<orderEntry type="sourceFolder" forTests="false" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.5" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.5" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis.generator:mybatis-generator-core:1.3.5" level="project" /> |
|||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest:3.2.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:3.2.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm:camunda-engine-spring:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm:camunda-engine:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.model:camunda-bpmn-model:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.model:camunda-xml-model:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.model:camunda-cmmn-model:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.dmn:camunda-engine-dmn:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.model:camunda-dmn-model:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.dmn:camunda-engine-feel-api:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.dmn:camunda-engine-feel-juel:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.commons:camunda-commons-typed-values:1.6.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-email:1.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.sun.mail:javax.mail:1.6.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-pool:commons-pool:1.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.uuid:java-uuid-generator:3.1.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm:camunda-engine-rest-jaxrs2:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.0.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jersey:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.7" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.13" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.13" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.13" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.13.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-server:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:osgi-resource-locator:1.0.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-jaxb:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-servlet-core:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.containers:jersey-container-servlet:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-bean-validation:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-spring4:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.inject:jersey-hk2:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.media:jersey-media-json-jackson:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.jersey.ext:jersey-entity-filtering:2.27" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-test:3.2.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:3.2.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp-core:3.2.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.webapp:camunda-webapp:classes:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm:camunda-engine-rest-core:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.webapp:camunda-webapp-webjar:7.10.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.spin:camunda-spin-dataformat-all:1.6.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.spin:camunda-spin-core:1.6.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.commons:camunda-commons-logging:1.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.commons:camunda-commons-utils:1.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.47" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.1.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-utils:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-api:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:aopalliance-repackaged:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-core:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-locator:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.22.0-CR2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:hk2-runlevel:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:class-model:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:asm-repackaged:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2:spring-bridge:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.glassfish.hk2.external:jakarta.inject:2.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.camunda.bpm.extension.swagger:camunda-bpm-swagger-json:7.8.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.webjars:swagger-ui:3.20.9" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.20" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.20" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.31" level="project" /> |
|||
<orderEntry type="library" name="Maven: de.odysseus.juel:juel-impl:2.2.7" level="project" /> |
|||
</component> |
|||
</module> |
@ -0,0 +1,310 @@ |
|||
#!/bin/sh |
|||
# ---------------------------------------------------------------------------- |
|||
# Licensed to the Apache Software Foundation (ASF) under one |
|||
# or more contributor license agreements. See the NOTICE file |
|||
# distributed with this work for additional information |
|||
# regarding copyright ownership. The ASF licenses this file |
|||
# to you under the Apache License, Version 2.0 (the |
|||
# "License"); you may not use this file except in compliance |
|||
# with the License. You may obtain a copy of the License at |
|||
# |
|||
# https://www.apache.org/licenses/LICENSE-2.0 |
|||
# |
|||
# Unless required by applicable law or agreed to in writing, |
|||
# software distributed under the License is distributed on an |
|||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
# KIND, either express or implied. See the License for the |
|||
# specific language governing permissions and limitations |
|||
# under the License. |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
# ---------------------------------------------------------------------------- |
|||
# Maven Start Up Batch script |
|||
# |
|||
# Required ENV vars: |
|||
# ------------------ |
|||
# JAVA_HOME - location of a JDK home dir |
|||
# |
|||
# Optional ENV vars |
|||
# ----------------- |
|||
# M2_HOME - location of maven2's installed home dir |
|||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|||
# e.g. to debug Maven itself, use |
|||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
if [ -z "$MAVEN_SKIP_RC" ] ; then |
|||
|
|||
if [ -f /etc/mavenrc ] ; then |
|||
. /etc/mavenrc |
|||
fi |
|||
|
|||
if [ -f "$HOME/.mavenrc" ] ; then |
|||
. "$HOME/.mavenrc" |
|||
fi |
|||
|
|||
fi |
|||
|
|||
# OS specific support. $var _must_ be set to either true or false. |
|||
cygwin=false; |
|||
darwin=false; |
|||
mingw=false |
|||
case "`uname`" in |
|||
CYGWIN*) cygwin=true ;; |
|||
MINGW*) mingw=true;; |
|||
Darwin*) darwin=true |
|||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home |
|||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html |
|||
if [ -z "$JAVA_HOME" ]; then |
|||
if [ -x "/usr/libexec/java_home" ]; then |
|||
export JAVA_HOME="`/usr/libexec/java_home`" |
|||
else |
|||
export JAVA_HOME="/Library/Java/Home" |
|||
fi |
|||
fi |
|||
;; |
|||
esac |
|||
|
|||
if [ -z "$JAVA_HOME" ] ; then |
|||
if [ -r /etc/gentoo-release ] ; then |
|||
JAVA_HOME=`java-config --jre-home` |
|||
fi |
|||
fi |
|||
|
|||
if [ -z "$M2_HOME" ] ; then |
|||
## resolve links - $0 may be a link to maven's home |
|||
PRG="$0" |
|||
|
|||
# need this for relative symlinks |
|||
while [ -h "$PRG" ] ; do |
|||
ls=`ls -ld "$PRG"` |
|||
link=`expr "$ls" : '.*-> \(.*\)$'` |
|||
if expr "$link" : '/.*' > /dev/null; then |
|||
PRG="$link" |
|||
else |
|||
PRG="`dirname "$PRG"`/$link" |
|||
fi |
|||
done |
|||
|
|||
saveddir=`pwd` |
|||
|
|||
M2_HOME=`dirname "$PRG"`/.. |
|||
|
|||
# make it fully qualified |
|||
M2_HOME=`cd "$M2_HOME" && pwd` |
|||
|
|||
cd "$saveddir" |
|||
# echo Using m2 at $M2_HOME |
|||
fi |
|||
|
|||
# For Cygwin, ensure paths are in UNIX format before anything is touched |
|||
if $cygwin ; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME=`cygpath --unix "$M2_HOME"` |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"` |
|||
[ -n "$CLASSPATH" ] && |
|||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"` |
|||
fi |
|||
|
|||
# For Mingw, ensure paths are in UNIX format before anything is touched |
|||
if $mingw ; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME="`(cd "$M2_HOME"; pwd)`" |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" |
|||
fi |
|||
|
|||
if [ -z "$JAVA_HOME" ]; then |
|||
javaExecutable="`which javac`" |
|||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then |
|||
# readlink(1) is not available as standard on Solaris 10. |
|||
readLink=`which readlink` |
|||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then |
|||
if $darwin ; then |
|||
javaHome="`dirname \"$javaExecutable\"`" |
|||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" |
|||
else |
|||
javaExecutable="`readlink -f \"$javaExecutable\"`" |
|||
fi |
|||
javaHome="`dirname \"$javaExecutable\"`" |
|||
javaHome=`expr "$javaHome" : '\(.*\)/bin'` |
|||
JAVA_HOME="$javaHome" |
|||
export JAVA_HOME |
|||
fi |
|||
fi |
|||
fi |
|||
|
|||
if [ -z "$JAVACMD" ] ; then |
|||
if [ -n "$JAVA_HOME" ] ; then |
|||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then |
|||
# IBM's JDK on AIX uses strange locations for the executables |
|||
JAVACMD="$JAVA_HOME/jre/sh/java" |
|||
else |
|||
JAVACMD="$JAVA_HOME/bin/java" |
|||
fi |
|||
else |
|||
JAVACMD="`which java`" |
|||
fi |
|||
fi |
|||
|
|||
if [ ! -x "$JAVACMD" ] ; then |
|||
echo "Error: JAVA_HOME is not defined correctly." >&2 |
|||
echo " We cannot execute $JAVACMD" >&2 |
|||
exit 1 |
|||
fi |
|||
|
|||
if [ -z "$JAVA_HOME" ] ; then |
|||
echo "Warning: JAVA_HOME environment variable is not set." |
|||
fi |
|||
|
|||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
|||
|
|||
# traverses directory structure from process work directory to filesystem root |
|||
# first directory with .mvn subdirectory is considered project base directory |
|||
find_maven_basedir() { |
|||
|
|||
if [ -z "$1" ] |
|||
then |
|||
echo "Path not specified to find_maven_basedir" |
|||
return 1 |
|||
fi |
|||
|
|||
basedir="$1" |
|||
wdir="$1" |
|||
while [ "$wdir" != '/' ] ; do |
|||
if [ -d "$wdir"/.mvn ] ; then |
|||
basedir=$wdir |
|||
break |
|||
fi |
|||
# workaround for JBEAP-8937 (on Solaris 10/Sparc) |
|||
if [ -d "${wdir}" ]; then |
|||
wdir=`cd "$wdir/.."; pwd` |
|||
fi |
|||
# end of workaround |
|||
done |
|||
echo "${basedir}" |
|||
} |
|||
|
|||
# concatenates all lines of a file |
|||
concat_lines() { |
|||
if [ -f "$1" ]; then |
|||
echo "$(tr -s '\n' ' ' < "$1")" |
|||
fi |
|||
} |
|||
|
|||
BASE_DIR=`find_maven_basedir "$(pwd)"` |
|||
if [ -z "$BASE_DIR" ]; then |
|||
exit 1; |
|||
fi |
|||
|
|||
########################################################################################## |
|||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
# This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
########################################################################################## |
|||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found .mvn/wrapper/maven-wrapper.jar" |
|||
fi |
|||
else |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." |
|||
fi |
|||
if [ -n "$MVNW_REPOURL" ]; then |
|||
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
else |
|||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
fi |
|||
while IFS="=" read key value; do |
|||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;; |
|||
esac |
|||
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Downloading from: $jarUrl" |
|||
fi |
|||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" |
|||
if $cygwin; then |
|||
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` |
|||
fi |
|||
|
|||
if command -v wget > /dev/null; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found wget ... using wget" |
|||
fi |
|||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|||
wget "$jarUrl" -O "$wrapperJarPath" |
|||
else |
|||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" |
|||
fi |
|||
elif command -v curl > /dev/null; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Found curl ... using curl" |
|||
fi |
|||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|||
curl -o "$wrapperJarPath" "$jarUrl" -f |
|||
else |
|||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f |
|||
fi |
|||
|
|||
else |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo "Falling back to using Java to download" |
|||
fi |
|||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" |
|||
# For Cygwin, switch paths to Windows format before running javac |
|||
if $cygwin; then |
|||
javaClass=`cygpath --path --windows "$javaClass"` |
|||
fi |
|||
if [ -e "$javaClass" ]; then |
|||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo " - Compiling MavenWrapperDownloader.java ..." |
|||
fi |
|||
# Compiling the Java class |
|||
("$JAVA_HOME/bin/javac" "$javaClass") |
|||
fi |
|||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|||
# Running the downloader |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo " - Running MavenWrapperDownloader.java ..." |
|||
fi |
|||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") |
|||
fi |
|||
fi |
|||
fi |
|||
fi |
|||
########################################################################################## |
|||
# End of extension |
|||
########################################################################################## |
|||
|
|||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} |
|||
if [ "$MVNW_VERBOSE" = true ]; then |
|||
echo $MAVEN_PROJECTBASEDIR |
|||
fi |
|||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" |
|||
|
|||
# For Cygwin, switch paths to Windows format before running java |
|||
if $cygwin; then |
|||
[ -n "$M2_HOME" ] && |
|||
M2_HOME=`cygpath --path --windows "$M2_HOME"` |
|||
[ -n "$JAVA_HOME" ] && |
|||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` |
|||
[ -n "$CLASSPATH" ] && |
|||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"` |
|||
[ -n "$MAVEN_PROJECTBASEDIR" ] && |
|||
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` |
|||
fi |
|||
|
|||
# Provide a "standardized" way to retrieve the CLI args that will |
|||
# work with both Windows and non-Windows executions. |
|||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" |
|||
export MAVEN_CMD_LINE_ARGS |
|||
|
|||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|||
|
|||
exec "$JAVACMD" \ |
|||
$MAVEN_OPTS \ |
|||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ |
|||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
|||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
@ -0,0 +1,182 @@ |
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Licensed to the Apache Software Foundation (ASF) under one |
|||
@REM or more contributor license agreements. See the NOTICE file |
|||
@REM distributed with this work for additional information |
|||
@REM regarding copyright ownership. The ASF licenses this file |
|||
@REM to you under the Apache License, Version 2.0 (the |
|||
@REM "License"); you may not use this file except in compliance |
|||
@REM with the License. You may obtain a copy of the License at |
|||
@REM |
|||
@REM https://www.apache.org/licenses/LICENSE-2.0 |
|||
@REM |
|||
@REM Unless required by applicable law or agreed to in writing, |
|||
@REM software distributed under the License is distributed on an |
|||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
@REM KIND, either express or implied. See the License for the |
|||
@REM specific language governing permissions and limitations |
|||
@REM under the License. |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Maven Start Up Batch script |
|||
@REM |
|||
@REM Required ENV vars: |
|||
@REM JAVA_HOME - location of a JDK home dir |
|||
@REM |
|||
@REM Optional ENV vars |
|||
@REM M2_HOME - location of maven2's installed home dir |
|||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands |
|||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending |
|||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|||
@REM e.g. to debug Maven itself, use |
|||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' |
|||
@echo off |
|||
@REM set title of command window |
|||
title %0 |
|||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' |
|||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% |
|||
|
|||
@REM set %HOME% to equivalent of $HOME |
|||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") |
|||
|
|||
@REM Execute a user defined script before this one |
|||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre |
|||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending |
|||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" |
|||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" |
|||
:skipRcPre |
|||
|
|||
@setlocal |
|||
|
|||
set ERROR_CODE=0 |
|||
|
|||
@REM To isolate internal variables from possible post scripts, we use another setlocal |
|||
@setlocal |
|||
|
|||
@REM ==== START VALIDATION ==== |
|||
if not "%JAVA_HOME%" == "" goto OkJHome |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME not found in your environment. >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
:OkJHome |
|||
if exist "%JAVA_HOME%\bin\java.exe" goto init |
|||
|
|||
echo. |
|||
echo Error: JAVA_HOME is set to an invalid directory. >&2 |
|||
echo JAVA_HOME = "%JAVA_HOME%" >&2 |
|||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|||
echo location of your Java installation. >&2 |
|||
echo. |
|||
goto error |
|||
|
|||
@REM ==== END VALIDATION ==== |
|||
|
|||
:init |
|||
|
|||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". |
|||
@REM Fallback to current working directory if not found. |
|||
|
|||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% |
|||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
|||
|
|||
set EXEC_DIR=%CD% |
|||
set WDIR=%EXEC_DIR% |
|||
:findBaseDir |
|||
IF EXIST "%WDIR%"\.mvn goto baseDirFound |
|||
cd .. |
|||
IF "%WDIR%"=="%CD%" goto baseDirNotFound |
|||
set WDIR=%CD% |
|||
goto findBaseDir |
|||
|
|||
:baseDirFound |
|||
set MAVEN_PROJECTBASEDIR=%WDIR% |
|||
cd "%EXEC_DIR%" |
|||
goto endDetectBaseDir |
|||
|
|||
:baseDirNotFound |
|||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR% |
|||
cd "%EXEC_DIR%" |
|||
|
|||
:endDetectBaseDir |
|||
|
|||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig |
|||
|
|||
@setlocal EnableExtensions EnableDelayedExpansion |
|||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
|||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
|||
|
|||
:endReadAdditionalConfig |
|||
|
|||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" |
|||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" |
|||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|||
|
|||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
|
|||
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
|||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B |
|||
) |
|||
|
|||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data. |
|||
if exist %WRAPPER_JAR% ( |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Found %WRAPPER_JAR% |
|||
) |
|||
) else ( |
|||
if not "%MVNW_REPOURL%" == "" ( |
|||
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|||
) |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Couldn't find %WRAPPER_JAR%, downloading it ... |
|||
echo Downloading from: %DOWNLOAD_URL% |
|||
) |
|||
|
|||
powershell -Command "&{"^ |
|||
"$webclient = new-object System.Net.WebClient;"^ |
|||
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ |
|||
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ |
|||
"}"^ |
|||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ |
|||
"}" |
|||
if "%MVNW_VERBOSE%" == "true" ( |
|||
echo Finished downloading %WRAPPER_JAR% |
|||
) |
|||
) |
|||
@REM End of extension |
|||
|
|||
@REM Provide a "standardized" way to retrieve the CLI args that will |
|||
@REM work with both Windows and non-Windows executions. |
|||
set MAVEN_CMD_LINE_ARGS=%* |
|||
|
|||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* |
|||
if ERRORLEVEL 1 goto error |
|||
goto end |
|||
|
|||
:error |
|||
set ERROR_CODE=1 |
|||
|
|||
:end |
|||
@endlocal & set ERROR_CODE=%ERROR_CODE% |
|||
|
|||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost |
|||
@REM check for post script, once with legacy .bat ending and once with .cmd ending |
|||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" |
|||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" |
|||
:skipRcPost |
|||
|
|||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
|||
if "%MAVEN_BATCH_PAUSE%" == "on" pause |
|||
|
|||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% |
|||
|
|||
exit /B %ERROR_CODE% |
@ -0,0 +1,213 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<parent> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-parent</artifactId> |
|||
<version>2.4.3</version> |
|||
<relativePath/> <!-- lookup parent from repository --> |
|||
</parent> |
|||
<groupId>com.fs.camunda.bpm</groupId> |
|||
<artifactId>example</artifactId> |
|||
<version>0.0.1-SNAPSHOT</version> |
|||
<name>example</name> |
|||
<description>Demo project for Spring Boot</description> |
|||
|
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
<camunda.spring-boot.version>7.15.0</camunda.spring-boot.version> |
|||
<spring-boot.version>2.4.3</spring-boot.version> |
|||
<maven.compiler.source>1.8</maven.compiler.source> |
|||
<maven.compiler.target>1.8</maven.compiler.target> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
|||
<hk2.version>2.5.0</hk2.version> |
|||
<mysql-connector.version>5.1.47</mysql-connector.version> |
|||
<camunda-swagger.version>7.8.0</camunda-swagger.version> |
|||
<camunda-spin.version>1.8.0</camunda-spin.version> |
|||
<swagger-ui.version>3.20.9</swagger-ui.version> |
|||
<springfox.version>2.9.2</springfox.version> |
|||
<fastjson.version>1.2.31</fastjson.version> |
|||
</properties> |
|||
|
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
<version>${spring-boot.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
<exclusions> |
|||
<exclusion> |
|||
<groupId>org.junit.vintage</groupId> |
|||
<artifactId>junit-vintage-engine</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<!--mybatis 依赖--> |
|||
<!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter --> |
|||
<dependency> |
|||
<groupId>org.mybatis.spring.boot</groupId> |
|||
<artifactId>mybatis-spring-boot-starter</artifactId> |
|||
<version>2.1.1</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.mybatis.generator</groupId> |
|||
<artifactId>mybatis-generator-core</artifactId> |
|||
<version>1.3.5</version> |
|||
</dependency> |
|||
|
|||
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok --> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<version>1.18.2</version> |
|||
<scope>provided</scope> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.camunda.bpm.springboot</groupId> |
|||
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId> |
|||
<version>${camunda.spring-boot.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.camunda.bpm.springboot</groupId> |
|||
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> |
|||
<version>${camunda.spring-boot.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.camunda.spin</groupId> |
|||
<artifactId>camunda-spin-dataformat-all</artifactId> |
|||
<version>${camunda-spin.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<version>${mysql-connector.version}</version> |
|||
</dependency> |
|||
|
|||
<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql --> |
|||
<dependency> |
|||
<groupId>org.postgresql</groupId> |
|||
<artifactId>postgresql</artifactId> |
|||
<version>42.1.1</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-devtools</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-jdbc</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.glassfish.hk2</groupId> |
|||
<artifactId>hk2</artifactId> |
|||
<version>${hk2.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.glassfish.hk2</groupId> |
|||
<artifactId>spring-bridge</artifactId> |
|||
<version>${hk2.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.camunda.bpm.extension.swagger</groupId> |
|||
<artifactId>camunda-bpm-swagger-json</artifactId> |
|||
<version>${camunda-swagger.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.webjars</groupId> |
|||
<artifactId>swagger-ui</artifactId> |
|||
<version>${swagger-ui.version}</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger2</artifactId> |
|||
<version>${springfox.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger-ui</artifactId> |
|||
<version>${springfox.version}</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.apache.commons</groupId> |
|||
<artifactId>commons-lang3</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>fastjson</artifactId> |
|||
<version>${fastjson.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>de.odysseus.juel</groupId> |
|||
<artifactId>juel-impl</artifactId> |
|||
<version>2.2.7</version> |
|||
</dependency> |
|||
</dependencies> |
|||
<build> |
|||
<finalName>camunda-service</finalName> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<configuration> |
|||
<mainClass>com.fs.camunda.bpm.example.ExampleApplication</mainClass> |
|||
</configuration> |
|||
<executions> |
|||
<execution> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-compiler-plugin</artifactId> |
|||
<configuration> |
|||
<source>1.8</source> |
|||
<target>1.8</target> |
|||
<encoding>utf-8</encoding> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-resources-plugin</artifactId> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-surefire-plugin</artifactId> |
|||
<configuration> |
|||
<skip>true</skip> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
|
|||
<distributionManagement> |
|||
<repository> |
|||
<id>fs-releases</id> |
|||
<name>fs-releases</name> |
|||
<url>http://10.8.30.22:8081/repository/fs-releases/</url> |
|||
</repository> |
|||
</distributionManagement> |
|||
|
|||
</project> |
@ -0,0 +1,52 @@ |
|||
package com.fs.camunda.bpm.example; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.fasterxml.jackson.databind.SerializationFeature; |
|||
import com.fs.camunda.bpm.example.conf.BasicPathAuthConfig; |
|||
import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean; |
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.ComponentScan; |
|||
import org.springframework.context.annotation.Scope; |
|||
import org.springframework.core.io.ClassPathResource; |
|||
import org.springframework.core.io.Resource; |
|||
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
|||
|
|||
import java.util.Map; |
|||
import java.util.Properties; |
|||
|
|||
@SpringBootApplication |
|||
@EnableProcessApplication |
|||
@ComponentScan("com") |
|||
@EnableSwagger2 |
|||
public class ExampleApplication { |
|||
|
|||
private static Logger logger = LoggerFactory.getLogger(ExampleApplication.class); |
|||
public static void main(String[] args) { |
|||
|
|||
Map<String, String> getenv = System.getenv(); |
|||
|
|||
logger.info("环境变量:"+JSON.toJSON(getenv)); |
|||
Resource resource = new ClassPathResource("application.yml"); |
|||
Properties properties = null; |
|||
YamlPropertiesFactoryBean yamlFactory = new YamlPropertiesFactoryBean(); |
|||
yamlFactory.setResources(resource); |
|||
properties = yamlFactory.getObject(); |
|||
logger.info("配置文件参数内容:"+ JSON.toJSON(properties)); |
|||
SpringApplication.run(ExampleApplication.class, args); |
|||
} |
|||
|
|||
//关闭spring boot jackson的FAIL_ON_EMPTY_BEANS
|
|||
@Bean |
|||
public ObjectMapper objectMapper() { |
|||
return new ObjectMapper().disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,108 @@ |
|||
package com.fs.camunda.bpm.example.conf; |
|||
|
|||
import com.fs.camunda.bpm.example.entity.CSResponse; |
|||
import com.fs.camunda.bpm.example.entity.CommonEnum; |
|||
import com.fs.camunda.bpm.example.utils.UserUtil; |
|||
import org.camunda.bpm.engine.IdentityService; |
|||
import org.camunda.bpm.engine.ProcessEngine; |
|||
import org.camunda.bpm.engine.impl.IdentityServiceImpl; |
|||
import org.camunda.bpm.engine.impl.digest._apacheCommonsCodec.Base64; |
|||
import org.camunda.bpm.engine.rest.exception.InvalidRequestException; |
|||
import org.camunda.bpm.engine.rest.util.EngineUtil; |
|||
import org.camunda.bpm.webapp.impl.security.auth.AuthenticationDto; |
|||
import org.camunda.bpm.webapp.impl.security.auth.AuthenticationService; |
|||
import org.camunda.bpm.webapp.impl.security.auth.Authentications; |
|||
import org.camunda.bpm.webapp.impl.security.auth.UserAuthentication; |
|||
import org.camunda.bpm.webapp.impl.util.ProcessEngineUtil; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
|
|||
import javax.servlet.*; |
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.ws.rs.core.Response; |
|||
import java.io.IOException; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/5/25. |
|||
*/ |
|||
public class BasicPathAuthConfig implements Filter { |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(BasicPathAuthConfig.class); |
|||
|
|||
|
|||
@Override |
|||
public void init(FilterConfig filterConfig) throws ServletException { |
|||
|
|||
logger.info("init方法"); |
|||
} |
|||
|
|||
|
|||
|
|||
@Override |
|||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { |
|||
logger.info("请求进入过滤验证功能"); |
|||
HttpServletRequest request = (HttpServletRequest) servletRequest; |
|||
// logger.info("请求url为:"+request.getRequestURL().toString());
|
|||
logger.info("请求路径为:"+request.getRequestURI()); |
|||
if(request.getRequestURI().contains("login") || request.getRequestURI().contains("default")|| request.getRequestURI().contains("api") |
|||
|| request.getRequestURI().contains("app")|| request.getRequestURI().contains("lib")){ |
|||
filterChain.doFilter(servletRequest, servletResponse); |
|||
}else{ |
|||
String header = request.getHeader("Authorization"); |
|||
if (header == null || !header.startsWith("Basic ")) { |
|||
throw new ServletException("No Auth info"); |
|||
} |
|||
boolean checkPassword = false; |
|||
String userName = ""; |
|||
ProcessEngine engine = getAddressedEngine("default"); |
|||
String encodedCredentials = header.substring(6); |
|||
String decodedCredentials = new String(Base64.decodeBase64(encodedCredentials),"UTF-8"); |
|||
int firstColonIndex = decodedCredentials.indexOf(":"); |
|||
if (firstColonIndex == -1) { |
|||
throw new ServletException("Auth params is lost"); |
|||
} else { |
|||
userName = decodedCredentials.substring(0, firstColonIndex); |
|||
String password = decodedCredentials.substring(firstColonIndex + 1); |
|||
checkPassword = engine.getIdentityService().checkPassword(userName, password); |
|||
} |
|||
if(!checkPassword){ |
|||
throw new ServletException("username or password is fault"); |
|||
} |
|||
logger.info("登陆用户为:"+userName); |
|||
auth(userName,request); |
|||
engine.getIdentityService().setAuthenticatedUserId(userName); |
|||
logger.info("流程继续执行"); |
|||
filterChain.doFilter(servletRequest, servletResponse); |
|||
} |
|||
|
|||
} |
|||
|
|||
protected ProcessEngine getAddressedEngine(String engineName) { |
|||
return EngineUtil.lookupProcessEngine(engineName); |
|||
} |
|||
|
|||
@Override |
|||
public void destroy() { |
|||
|
|||
} |
|||
|
|||
|
|||
public Response auth(String username,HttpServletRequest request){ |
|||
String engineName = "default"; |
|||
final ProcessEngine processEngine = ProcessEngineUtil.lookupProcessEngine(engineName); |
|||
if(processEngine == null) { |
|||
throw new InvalidRequestException(Response.Status.BAD_REQUEST, "Process engine with name "+engineName+" does not exist"); |
|||
} |
|||
// make sure authentication is executed without authentication :)
|
|||
processEngine.getIdentityService().clearAuthentication(); |
|||
|
|||
AuthenticationService authenticationService = new AuthenticationService(); |
|||
UserAuthentication authentication = (UserAuthentication) authenticationService.createAuthenticate(processEngine, username, null, null); |
|||
if (request != null) { |
|||
Authentications.revalidateSession(request, authentication); |
|||
} |
|||
return Response.ok(AuthenticationDto.fromAuthentication(authentication)).build(); |
|||
|
|||
} |
|||
} |
@ -0,0 +1,87 @@ |
|||
package com.fs.camunda.bpm.example.conf; |
|||
|
|||
|
|||
import org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.boot.autoconfigure.AutoConfigureAfter; |
|||
import org.springframework.boot.web.servlet.FilterRegistrationBean; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.lang.Nullable; |
|||
import org.springframework.web.servlet.HandlerInterceptor; |
|||
import org.springframework.web.servlet.ModelAndView; |
|||
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; |
|||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
|||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
|||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
|
|||
@Configuration |
|||
public class DemoWebMvcConfig implements WebMvcConfigurer { |
|||
private static final Logger logger = LoggerFactory.getLogger(DemoWebMvcConfig.class); |
|||
|
|||
|
|||
//请求过滤器 暂时还没用 后续应该与session搭配使用
|
|||
|
|||
|
|||
private static List<String> AUTH_WHITELIST=Arrays.asList( |
|||
// -- swagger ui
|
|||
"/v2/api-docs" |
|||
); |
|||
|
|||
@Bean |
|||
public FilterRegistrationBean SenseSsoOauthWebFilterFilterRegistration() { |
|||
|
|||
FilterRegistrationBean registration = new FilterRegistrationBean(); |
|||
registration.setFilter(new BasicPathAuthConfig());//创建上面的自定义的WebFilter对象
|
|||
registration.addUrlPatterns("/*"); |
|||
registration.setName("BasicAuthConfig");//该Filter的名字,自己随便定义
|
|||
registration.setOrder(1);//启动时候的优先级
|
|||
return registration; |
|||
|
|||
} |
|||
|
|||
|
|||
@Override |
|||
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { |
|||
configurer.enable(); |
|||
} |
|||
|
|||
|
|||
@Override |
|||
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
|||
// registry.addResourceHandler("/app/**").addResourceLocations(classpath + "/app/");
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
/*@Override |
|||
public void addInterceptors(InterceptorRegistry registry) { |
|||
registry.addInterceptor(new HandlerInterceptor() { |
|||
@Override |
|||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) |
|||
throws Exception { |
|||
String requestURI = request.getRequestURI(); |
|||
logger.info(">>>>>>>>>>>>>请求路径>>>>>>>>>>>>>>>>" + requestURI); |
|||
for (String singleAuth : AUTH_WHITELIST) { |
|||
if (requestURI.contains(singleAuth)) { |
|||
return true; |
|||
} |
|||
} |
|||
return true; |
|||
} |
|||
@Override |
|||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, |
|||
@Nullable Exception ex) throws Exception { |
|||
|
|||
} |
|||
}); |
|||
}*/ |
|||
|
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
package com.fs.camunda.bpm.example.controller; |
|||
|
|||
import com.fs.camunda.bpm.example.entity.CSResponse; |
|||
import com.fs.camunda.bpm.example.entity.CommonEnum; |
|||
import com.fs.camunda.bpm.example.utils.UserUtil; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.camunda.bpm.engine.*; |
|||
import org.camunda.bpm.engine.identity.User; |
|||
import org.camunda.bpm.engine.repository.Deployment; |
|||
import org.camunda.bpm.engine.repository.DeploymentBuilder; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.zip.ZipInputStream; |
|||
|
|||
@RestController |
|||
@RequestMapping("/repository") |
|||
public class DeploymentController { |
|||
|
|||
|
|||
private Logger logger = LoggerFactory.getLogger(DeploymentController.class); |
|||
|
|||
@Autowired |
|||
private RepositoryService repositoryService; |
|||
|
|||
@Autowired |
|||
private RuntimeService runtimeService; |
|||
|
|||
@Autowired |
|||
private TaskService taskService; |
|||
|
|||
@Autowired |
|||
private IdentityService identityService; |
|||
|
|||
private ProcessEngine engine ; |
|||
|
|||
|
|||
@RequestMapping(value = "/deployments") |
|||
public CSResponse deployments(@RequestParam(value = "file")MultipartFile file,@RequestParam(value = "image",required = false)MultipartFile image, HttpServletRequest request){ |
|||
try{ |
|||
String username = UserUtil.getLoginUserName(request); |
|||
if(username == "" ){ |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc(),"用户未登录"); |
|||
} |
|||
identityService.setAuthenticatedUserId(username); |
|||
DeploymentBuilder deployment = repositoryService.createDeployment(); |
|||
|
|||
String filename = file.getOriginalFilename(); |
|||
if(StringUtils.isEmpty(filename)){ |
|||
filename = file.getName(); |
|||
} |
|||
|
|||
if(filename.endsWith(".bpm20.xml")||filename.endsWith("bpmn")){ |
|||
if(image!=null){ |
|||
deployment.addInputStream(image.getOriginalFilename(),image.getInputStream()); |
|||
} |
|||
deployment.addInputStream(filename,file.getInputStream()); |
|||
}else if(filename.endsWith(".zip")||filename.endsWith(".bar")){ |
|||
deployment.addZipInputStream(new ZipInputStream(file.getInputStream())); |
|||
}else{ |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc() |
|||
,"请上传 .bpmn20.xml, .bpmn, .bar or .zip 类型文件"); |
|||
} |
|||
deployment.name(filename); |
|||
Deployment deploy = deployment.deploy(); |
|||
identityService.setAuthenticatedUserId(null); |
|||
return new CSResponse("流程部署成功,id:"+deploy.getId()+",name:"+deploy.getName()); |
|||
}catch (Exception e){ |
|||
logger.error("deployments 出现异常 , 原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.fs.camunda.bpm.example.controller; |
|||
|
|||
import org.camunda.bpm.engine.HistoryService; |
|||
import org.camunda.bpm.engine.history.HistoricProcessInstanceQuery; |
|||
import org.camunda.bpm.engine.history.HistoricVariableInstance; |
|||
import org.camunda.bpm.engine.history.HistoricVariableInstanceQuery; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/30. |
|||
*/ |
|||
@RestController |
|||
public class HistoryController { |
|||
|
|||
@Autowired |
|||
private HistoryService historyService; |
|||
|
|||
|
|||
@RequestMapping("/varaibles") |
|||
public List getVaraibles(@RequestParam String processInstId){ |
|||
HistoricVariableInstanceQuery historicVariableInstanceQuery = historyService.createHistoricVariableInstanceQuery(); |
|||
List<HistoricVariableInstance> file = historicVariableInstanceQuery.processInstanceId(processInstId).variableTypeIn("file").list(); |
|||
return file; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
package com.fs.camunda.bpm.example.controller; |
|||
|
|||
import com.fs.camunda.bpm.example.entity.CSResponse; |
|||
import com.fs.camunda.bpm.example.entity.CommonEnum; |
|||
import com.fs.camunda.bpm.example.entity.ProcessDefineEntity; |
|||
import com.fs.camunda.bpm.example.entity.ProcessInstanceEntity; |
|||
import com.fs.camunda.bpm.example.utils.UserUtil; |
|||
import org.camunda.bpm.engine.*; |
|||
import org.camunda.bpm.engine.identity.User; |
|||
import org.camunda.bpm.engine.repository.ProcessDefinition; |
|||
import org.camunda.bpm.engine.runtime.ProcessInstance; |
|||
import org.camunda.bpm.engine.task.TaskQuery; |
|||
import org.camunda.bpm.model.bpmn.BpmnModelInstance; |
|||
import org.camunda.bpm.webapp.impl.security.auth.Authentication; |
|||
import org.camunda.bpm.webapp.impl.security.auth.AuthenticationService; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.FileInputStream; |
|||
import java.io.FileNotFoundException; |
|||
import java.io.FileOutputStream; |
|||
import java.io.IOException; |
|||
import java.util.Base64; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
import java.util.Scanner; |
|||
|
|||
@RestController |
|||
public class ProcessInstanceController { |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(ProcessInstanceController.class); |
|||
|
|||
|
|||
@Autowired |
|||
private RepositoryService repositoryService; |
|||
|
|||
@Autowired |
|||
private RuntimeService runtimeService; |
|||
|
|||
@Autowired |
|||
private TaskService taskService; |
|||
|
|||
@Autowired |
|||
private IdentityService identityService; |
|||
|
|||
@Autowired |
|||
private ProcessEngine processEngine; |
|||
|
|||
|
|||
@RequestMapping("/process-definition/start") |
|||
public CSResponse startProcessInstance(@RequestBody ProcessDefineEntity processDefineEntity, HttpServletRequest request){ |
|||
|
|||
try{ |
|||
|
|||
String username = UserUtil.getLoginUserName(request); |
|||
if(username == "" ){ |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc(),"用户未登录"); |
|||
} |
|||
identityService.setAuthenticatedUserId(username); |
|||
String processDefineId = processDefineEntity.getProcessDefineId(); |
|||
HashMap<String,Object> variables = (HashMap<String, Object>) processDefineEntity.getVariables(); |
|||
//根据流程定义id来启动实例
|
|||
runtimeService.startProcessInstanceById(processDefineId,variables); |
|||
identityService.setAuthenticatedUserId(null); |
|||
return new CSResponse("流程实例启动"); |
|||
}catch (Exception e){ |
|||
logger.error("启动流程实例失败,原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
@RequestMapping("/process-definition/delete") |
|||
public CSResponse deleteProcessInstance(@RequestBody ProcessInstanceEntity processInstanceEntity, HttpServletRequest request){ |
|||
try{ |
|||
if(processInstanceEntity.getProcessInstanceId() == null){ |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),"流程实例id不可为空"); |
|||
} |
|||
if(processInstanceEntity.getReason() == null){ |
|||
processInstanceEntity.setReason(""); |
|||
} |
|||
runtimeService.deleteProcessInstance(processInstanceEntity.getProcessInstanceId(),processInstanceEntity.getReason()); |
|||
return new CSResponse("流程驳回成功"); |
|||
}catch (Exception e){ |
|||
logger.error("流程驳回失败,原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),"流程驳回失败"); |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,305 @@ |
|||
package com.fs.camunda.bpm.example.controller; |
|||
|
|||
import com.fs.camunda.bpm.example.entity.*; |
|||
import com.fs.camunda.bpm.example.utils.UserUtil; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.camunda.bpm.engine.*; |
|||
import org.camunda.bpm.engine.history.HistoricActivityInstance; |
|||
import org.camunda.bpm.engine.history.HistoricTaskInstance; |
|||
import org.camunda.bpm.engine.history.HistoricTaskInstanceQuery; |
|||
import org.camunda.bpm.engine.identity.User; |
|||
import org.camunda.bpm.engine.rest.dto.VariableValueDto; |
|||
import org.camunda.bpm.engine.rest.dto.runtime.TriggerVariableValueDto; |
|||
import org.camunda.bpm.engine.rest.dto.task.TaskDto; |
|||
import org.camunda.bpm.engine.runtime.ActivityInstance; |
|||
import org.camunda.bpm.engine.runtime.ProcessInstance; |
|||
import org.camunda.bpm.engine.task.Task; |
|||
import org.camunda.bpm.engine.task.TaskQuery; |
|||
import org.camunda.bpm.model.bpmn.Bpmn; |
|||
import org.camunda.bpm.model.bpmn.BpmnModelInstance; |
|||
import org.camunda.bpm.model.bpmn.builder.ProcessBuilder; |
|||
import org.camunda.bpm.model.bpmn.builder.UserTaskBuilder; |
|||
import org.camunda.bpm.model.bpmn.instance.*; |
|||
import org.camunda.bpm.model.bpmn.instance.Process; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
import org.springframework.web.util.UriComponentsBuilder; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
import java.util.*; |
|||
import java.util.stream.Collectors; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/5/29. |
|||
*/ |
|||
@RestController |
|||
public class TaskController { |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(ProcessInstanceController.class); |
|||
|
|||
@Autowired |
|||
private RepositoryService repositoryService; |
|||
|
|||
@Autowired |
|||
private RuntimeService runtimeService; |
|||
|
|||
@Autowired |
|||
private TaskService taskService; |
|||
|
|||
@Autowired |
|||
private IdentityService identityService; |
|||
|
|||
@Autowired |
|||
private HistoryService historyService; |
|||
|
|||
@Autowired |
|||
private ProcessEngine processEngine; |
|||
|
|||
@RequestMapping("/task/complete") |
|||
public CSResponse complete(@RequestBody TaskRequestEntity taskRequestEntity, HttpServletRequest request){ |
|||
try{ |
|||
String username = taskRequestEntity.getUserId(); |
|||
HashMap<String,Object> variables = taskRequestEntity.getVariables(); |
|||
identityService.setAuthenticatedUserId(username); |
|||
String taskid = taskRequestEntity.getTaskId(); |
|||
taskService.complete(taskid,variables); |
|||
identityService.setAuthenticatedUserId(null); |
|||
return new CSResponse("任务complete完成"); |
|||
}catch (Exception e){ |
|||
logger.error("完成任务失败,原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
} |
|||
|
|||
@RequestMapping("/task/turnDown") |
|||
public CSResponse trunDownTask(@RequestBody TurnDownEntity turnDownEntity,HttpServletRequest request){ |
|||
try{ |
|||
String rejectType = turnDownEntity.getRejectType(); |
|||
if(StringUtils.isBlank(rejectType)){ |
|||
throw new Exception("驳回类型不能为空!"); |
|||
} |
|||
List<TaskDto> taskList = new ArrayList<TaskDto>(); |
|||
ActivityInstance tree = runtimeService.getActivityInstance(turnDownEntity.getProcessInstId()); |
|||
if(rejectType.equals(turnDownEntity.REJECT_TO_START)){ |
|||
List<HistoricActivityInstance> resultList = historyService |
|||
.createHistoricActivityInstanceQuery() |
|||
.processInstanceId(turnDownEntity.getProcessInstId()) |
|||
.activityType("userTask") |
|||
.finished() |
|||
.orderByHistoricActivityInstanceEndTime() |
|||
.asc() |
|||
.list(); |
|||
if (resultList == null || resultList.size() <= 0) { |
|||
throw new Exception("未找到发起节点"); |
|||
} |
|||
turnDownEntity.setToActId(resultList.get(0).getActivityId()); |
|||
}else if(rejectType.equals(turnDownEntity.REJECT_TO_LAST)){ |
|||
List<HistoricActivityInstance> resultList = historyService |
|||
.createHistoricActivityInstanceQuery() |
|||
.processInstanceId(turnDownEntity.getProcessInstId()) |
|||
.activityType("userTask") |
|||
.finished() |
|||
.orderByHistoricActivityInstanceEndTime() |
|||
.desc() |
|||
.list(); |
|||
if (resultList == null || resultList.size() <= 0) { |
|||
throw new Exception("未找到上一节点"); |
|||
} |
|||
turnDownEntity.setToActId(resultList.get(0).getActivityId()); |
|||
}else if(rejectType.equals(turnDownEntity.REJECT_TO_TARGET)){ |
|||
if(StringUtils.isBlank(turnDownEntity.getToActId())){ |
|||
throw new Exception("指定目标节点不能为空!"); |
|||
} |
|||
}else{ |
|||
throw new Exception("驳回类型值不对,三种类型 1:起草节点,2:上一节点,3:目标节点!"); |
|||
} |
|||
|
|||
taskService.createComment(turnDownEntity.getTaskId(), turnDownEntity.getProcessInstId(), "驳回流程"); |
|||
|
|||
runtimeService |
|||
.createProcessInstanceModification(turnDownEntity.getProcessInstId()) |
|||
.cancelActivityInstance(getInstanceIdForActivity(tree, turnDownEntity.getTaskDefKey())) |
|||
.startBeforeActivity(turnDownEntity.getToActId()) |
|||
.execute(); |
|||
|
|||
|
|||
taskList = simpleGetTasks(turnDownEntity.getProcessInstId()); |
|||
// if (taskList != null && taskList.size() == 1) {
|
|||
// taskService.setAssignee(taskList.get(0).getId(), pscCommonTaskRequest.getNextUserId());
|
|||
// }
|
|||
// taskList = simpleGetTasks(pscCommonTaskRequest.getProcessInstId());
|
|||
|
|||
|
|||
return new CSResponse("驳回任务完成"); |
|||
}catch (Exception e){ |
|||
logger.error("驳回任务失败,原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
} |
|||
|
|||
public String getInstanceIdForActivity(ActivityInstance activityInstance, String activityId) { |
|||
ActivityInstance instance = getChildInstanceForActivity(activityInstance, activityId); |
|||
if (instance != null) { |
|||
return instance.getId(); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public ActivityInstance getChildInstanceForActivity(ActivityInstance activityInstance, String activityId) { |
|||
if (activityId.equals(activityInstance.getActivityId())) { |
|||
return activityInstance; |
|||
} |
|||
|
|||
for (ActivityInstance childInstance : activityInstance.getChildActivityInstances()) { |
|||
ActivityInstance instance = getChildInstanceForActivity(childInstance, activityId); |
|||
if (instance != null) { |
|||
return instance; |
|||
} |
|||
} |
|||
|
|||
return null; |
|||
} |
|||
|
|||
public List<TaskDto> simpleGetTasks(String processInstId) throws Exception { |
|||
List<TaskDto> resultList = new ArrayList<TaskDto>(); |
|||
List<Task> taskList = taskService.createTaskQuery().processInstanceId(processInstId).list(); |
|||
for (Task task : taskList) { |
|||
TaskDto dto = new TaskDto(); |
|||
dto = TaskDto.fromEntity(task); |
|||
resultList.add(dto); |
|||
} |
|||
return resultList; |
|||
} |
|||
|
|||
|
|||
@RequestMapping("/task/resolved") |
|||
public CSResponse resolved(@RequestBody TaskRequestEntity taskRequestEntity, HttpServletRequest request){ |
|||
try{ |
|||
String username = taskRequestEntity.getUserId(); |
|||
HashMap<String,Object> variables = taskRequestEntity.getVariables(); |
|||
identityService.setAuthenticatedUserId(username); |
|||
String taskId = taskRequestEntity.getTaskId(); |
|||
taskService.resolveTask(taskId,variables); |
|||
identityService.setAuthenticatedUserId(null); |
|||
return new CSResponse("任务resolve完成"); |
|||
}catch (Exception e){ |
|||
logger.error("完成任务失败,原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
} |
|||
|
|||
@RequestMapping("/task/addCountersign") |
|||
public CSResponse addCountersign(@RequestBody Countersign countersign){ |
|||
try{ |
|||
String taskId = countersign.taskId; |
|||
ArrayList<String> assigneeList = countersign.assigneeList; |
|||
Map<String,Object> variables = new HashMap<>(); |
|||
variables.put("assigneeList",assigneeList); |
|||
taskService.complete(taskId,variables); |
|||
return new CSResponse("添加会签人员功能完成"); |
|||
}catch (Exception e){ |
|||
logger.error("完成任务失败,原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
} |
|||
|
|||
|
|||
/*试验代码*/ |
|||
|
|||
protected <T extends BpmnModelElementInstance> T createElement(BpmnModelElementInstance parentElement, String id, Class<T> elementClass) { |
|||
T element = parentElement.getModelInstance().newInstance(elementClass); |
|||
element.setAttributeValue("id", id, true); |
|||
parentElement.addChildElement(element); |
|||
return element; |
|||
} |
|||
|
|||
public SequenceFlow createSequenceFlow(Process process, FlowNode from, FlowNode to) { |
|||
String identifier = from.getId() + "-" + to.getId(); |
|||
SequenceFlow sequenceFlow = createElement( process, identifier, SequenceFlow.class); |
|||
process.addChildElement(sequenceFlow); |
|||
sequenceFlow.setSource(from); |
|||
from.getOutgoing().add(sequenceFlow); |
|||
sequenceFlow.setTarget(to); |
|||
to.getIncoming().add(sequenceFlow); |
|||
return sequenceFlow; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
// @RequestMapping("/task/addTask")
|
|||
public void addDynamicTask(@RequestBody TaskRequestEntity taskRequestEntity,HttpServletResponse response){ |
|||
String taskId = taskRequestEntity.getTaskId(); |
|||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); |
|||
|
|||
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(task.getProcessInstanceId()).tenantIdIn("test02").orderByTenantId().desc().list().get(0); |
|||
|
|||
BpmnModelInstance bpmnModelInstance = repositoryService.getBpmnModelInstance(processInstance.getProcessDefinitionId()); |
|||
|
|||
UserTask userTask = (UserTask) bpmnModelInstance.getModelElementById("deptLeaderAudit"); |
|||
SequenceFlow outgoingSequenceFlow = userTask.getOutgoing().iterator().next(); |
|||
FlowNode serviceTask = outgoingSequenceFlow.getTarget(); |
|||
userTask.getOutgoing().remove(outgoingSequenceFlow); |
|||
UserTaskBuilder userTaskBuilder = userTask.builder() |
|||
.userTask("jiaqian"); |
|||
userTaskBuilder.camundaAssignee("cheey"); |
|||
userTaskBuilder.camundaCandidateGroups("sales"); |
|||
BpmnModelInstance instance = userTaskBuilder.connectTo(serviceTask.getId()).done(); |
|||
|
|||
|
|||
/* Definitions definitions = bpmnModelInstance.getDefinitions(); |
|||
Process process = createElement( definitions, "process-before", Process.class); |
|||
UserTask task1 = createElement(process, "task1", UserTask.class); |
|||
task1.setName("User Task"); |
|||
task1.setCamundaAssignee("cheey"); |
|||
task1.builder().userTask().connectTo(serviceTask.getId()); |
|||
|
|||
|
|||
UserTask deptLeaderAudit = (UserTask) bpmnModelInstance.getModelElementById("deptLeaderAudit"); |
|||
|
|||
ExclusiveGateway exclusivegateway = (ExclusiveGateway) bpmnModelInstance.getModelElementById("exclusivegateway");*/ |
|||
|
|||
|
|||
/*createSequenceFlow(process,deptLeaderAudit,task1); |
|||
createSequenceFlow(process,task1,exclusivegateway); |
|||
Bpmn.validateModel(bpmnModelInstance); |
|||
ProcessBuilder builder = process.builder(); |
|||
try { |
|||
Bpmn.writeModelToStream(response.getOutputStream(),bpmnModelInstance); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
}*/ |
|||
} |
|||
|
|||
|
|||
public CSResponse getUnfinishedTask(){ |
|||
try{ |
|||
HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery(); |
|||
HistoricTaskInstanceQuery unfinished = historicTaskInstanceQuery.unfinished(); |
|||
List<HistoricTaskInstance> userLists = unfinished.taskAssignee("cheey").list(); |
|||
List<HistoricTaskInstance> groupLists = unfinished.taskInvolvedGroup("sales").list(); |
|||
HashMap<String,HistoricTaskInstance> res = new HashMap<>(); |
|||
for(HistoricTaskInstance user : userLists){ |
|||
res.put(user.getId(),user); |
|||
} |
|||
for (HistoricTaskInstance group : groupLists){ |
|||
res.put(group.getId(),group); |
|||
} |
|||
// List<HistoricTaskInstance> groupLists2 = groupLists.stream().filter(x->x.getId().equals("")).collect(Collectors.toList());
|
|||
Object[] objects = res.values().toArray(); |
|||
|
|||
return new CSResponse("任务resolve完成"); |
|||
}catch (Exception e){ |
|||
logger.error("完成任务失败,原因:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,147 @@ |
|||
package com.fs.camunda.bpm.example.controller; |
|||
|
|||
import com.fs.camunda.bpm.example.entity.*; |
|||
import com.fs.camunda.bpm.example.service.UserService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.apache.logging.log4j.util.Strings; |
|||
import org.camunda.bpm.engine.IdentityService; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/22. |
|||
*/ |
|||
@Controller |
|||
public class UserController { |
|||
private static Logger logger = LoggerFactory.getLogger(UserController.class); |
|||
|
|||
@Autowired |
|||
private IdentityService identityService; |
|||
|
|||
@Autowired |
|||
private UserService userService; |
|||
|
|||
|
|||
|
|||
|
|||
@RequestMapping(value = "/user/check") |
|||
@ResponseBody |
|||
public CSResponse checkUser(@RequestBody UserRequestEntity user){ |
|||
|
|||
try{ |
|||
|
|||
if(!(StringUtils.isNotBlank(user.getType())&&StringUtils.isNotBlank(user.getId()))){ |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),"类型与id都不能为空"); |
|||
} |
|||
|
|||
String result = "类型有问题,请选择0-2之间类型"; |
|||
|
|||
Boolean isExist = true; |
|||
if(user.getType() .equals("0") ){ |
|||
//0代表用户 1代表组 2代表租户
|
|||
isExist = userService.checkUser(user.getId()); |
|||
result = isExist==true?"用户已经存在":"该用户未存在"; |
|||
}else if(user.getType() .equals("1") ){ |
|||
//0代表用户 1代表组 2代表租户
|
|||
isExist = userService.checkGroup(user.getId()); |
|||
result = isExist==true?"组已经存在":"该组未存在"; |
|||
}else if(user.getType() .equals("2") ){ |
|||
//0代表用户 1代表组 2代表租户
|
|||
isExist = userService.checkTenant(user.getId()); |
|||
result = isExist==true?"租户已经存在":"该租户未存在"; |
|||
} |
|||
UserResponseEntity userResponseEntity = new UserResponseEntity(); |
|||
userResponseEntity.setDesc(result); |
|||
userResponseEntity.setIsExist(isExist); |
|||
return new CSResponse(userResponseEntity); |
|||
|
|||
}catch (Exception e){ |
|||
logger.error("用户检查异常:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
|
|||
} |
|||
|
|||
@RequestMapping(value = "/membership/update") |
|||
@ResponseBody |
|||
public CSResponse updateMembership(@RequestBody ObjectMemberEntity membership){ |
|||
try{ |
|||
String result = ""; |
|||
Boolean state = userService.updateGroupAndUser(membership); |
|||
if(state){ |
|||
result="修改成功"; |
|||
}else{ |
|||
result = "修改失败"; |
|||
} |
|||
return new CSResponse(result); |
|||
}catch (Exception e){ |
|||
logger.error("用户检查异常:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
/* *//** |
|||
* 用户登录(REST) |
|||
* 继承camunda的login方法,将camunda的缓存也设置到session中,后续如果有用到restapi时候, |
|||
* camunda的缓存就会有作用了 |
|||
* |
|||
* @return |
|||
*//*
|
|||
@RequestMapping(value = "/user/login", method = RequestMethod.POST) |
|||
@ResponseBody |
|||
public CSResponse login(@RequestBody UserInfo userInfo, HttpServletRequest request) { |
|||
try{ |
|||
|
|||
|
|||
//获取用户数据
|
|||
String username = userInfo.getUsername(); |
|||
String password = userInfo.getPassword(); |
|||
this.request = request; |
|||
//系统自带的登录,让系统的缓存也生效
|
|||
this.doLogin("default","tasklist",username,password); |
|||
logger.debug("login request: {username={}, password={}}", username, password); |
|||
boolean checkPassword = identityService.checkPassword(username, password); |
|||
HashMap<String, Boolean> result = new HashMap<String, Boolean>(); |
|||
if (checkPassword) { |
|||
//需要重新获取session,之前的认证过失效
|
|||
HttpSession session = request.getSession(); |
|||
User user = identityService.createUserQuery().userId(username).singleResult(); |
|||
session.setAttribute("user",user); |
|||
List<Group> groupList = identityService.createGroupQuery().groupMember(username).list(); |
|||
session.setAttribute("groups", groupList); |
|||
String[] groupNames = new String[groupList.size()]; |
|||
for (int i = 0; i < groupNames.length; i++) { |
|||
System.out.println(groupList.get(i).getName()); |
|||
groupNames[i] = groupList.get(i).getName(); |
|||
} |
|||
session.setAttribute("groupNames", ArrayUtils.toString(groupNames)); |
|||
result.put("authorized", true); |
|||
} else { |
|||
result.put("authorized", false); |
|||
} |
|||
return new CSResponse(result); |
|||
}catch (Exception e){ |
|||
logger.error("用户登录异常:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
} |
|||
|
|||
@RequestMapping(value = "/user/logout") |
|||
public CSResponse logout(HttpSession session) { |
|||
try{ |
|||
session.removeAttribute("user"); |
|||
this.doLogout("default"); |
|||
return new CSResponse(); |
|||
} |
|||
catch (Exception e){ |
|||
logger.error("用户登出异常:"+e); |
|||
return new CSResponse(CommonEnum.SYSTEM_ERROR.getCode(),CommonEnum.SYSTEM_ERROR.getDesc()); |
|||
} |
|||
}*/ |
@ -0,0 +1,53 @@ |
|||
/** |
|||
* |
|||
*/ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author cheey |
|||
* |
|||
*/ |
|||
@Data |
|||
public class CSResponse implements Serializable { |
|||
|
|||
/** |
|||
* |
|||
*/ |
|||
private static final long serialVersionUID = 8820950155758688519L; |
|||
|
|||
|
|||
private String code; |
|||
|
|||
private String desc; |
|||
|
|||
private Serializable data; |
|||
|
|||
public CSResponse(String code, String desc, Serializable data) { |
|||
super(); |
|||
this.code = code; |
|||
this.desc = desc; |
|||
this.data = data; |
|||
} |
|||
|
|||
public CSResponse(String code, String desc) { |
|||
super(); |
|||
this.code = code; |
|||
this.desc = desc; |
|||
} |
|||
|
|||
public CSResponse(Serializable data) { |
|||
this.code = CommonEnum.SUCCESS.getCode(); |
|||
this.desc = CommonEnum.SUCCESS.getDesc(); |
|||
this.data = data; |
|||
} |
|||
|
|||
public CSResponse() { |
|||
this.code = CommonEnum.SUCCESS.getCode(); |
|||
this.desc = CommonEnum.SUCCESS.getDesc(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
/** |
|||
* |
|||
*/ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Getter; |
|||
|
|||
/** |
|||
* @author sunnan |
|||
* |
|||
*/ |
|||
@Getter |
|||
public enum CommonEnum { |
|||
|
|||
SUCCESS("0000","接口请求成功"), |
|||
|
|||
SYSTEM_ERROR("5000","失败"); |
|||
|
|||
|
|||
|
|||
private String code; |
|||
|
|||
private String desc; |
|||
|
|||
CommonEnum(String code, String desc) { |
|||
this.code = code; |
|||
this.desc = desc; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.ArrayList; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2021/5/26. |
|||
*/ |
|||
@Data |
|||
public class Countersign { |
|||
|
|||
public ArrayList<String> assigneeList; |
|||
|
|||
public String taskId; |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/7/8. |
|||
*/ |
|||
@Data |
|||
public class ObjectMemberEntity implements Serializable { |
|||
|
|||
private String userId; |
|||
|
|||
private String originGroupId; |
|||
|
|||
private String titleGroupId; |
|||
|
|||
private String originTenantId; |
|||
|
|||
private String titleTenantId; |
|||
|
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/5/21. |
|||
*/ |
|||
|
|||
@Data |
|||
public class ProcessDefineEntity implements Serializable{ |
|||
|
|||
private String processDefineId; |
|||
|
|||
private String processDefineKey; |
|||
|
|||
private String bussinessKey; |
|||
|
|||
private Map<String,Object> variables; |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2021/6/8. |
|||
*/ |
|||
@Data |
|||
public class ProcessInstanceEntity { |
|||
|
|||
private String processInstanceId; |
|||
|
|||
private String reason; |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
import org.camunda.bpm.engine.rest.dto.task.TaskDto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/5/29. |
|||
*/ |
|||
@Data |
|||
public class TaskEntity implements Serializable { |
|||
|
|||
private List<TaskDto> taskDtos; |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.HashMap; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/2. |
|||
*/ |
|||
@Data |
|||
public class TaskRequestEntity { |
|||
|
|||
|
|||
private String taskId; |
|||
|
|||
private HashMap<String,Object> variables; |
|||
|
|||
private String userId; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2021/5/27. |
|||
*/ |
|||
@Data |
|||
public class TurnDownEntity { |
|||
|
|||
private String rejectType; //驳回类型,1:起草节点,2:上一节点,3:目标节点
|
|||
|
|||
private String processInstId;//流程实例ID
|
|||
|
|||
private String toActId;//目标节点Id
|
|||
|
|||
private String taskId;//任务id
|
|||
|
|||
private String taskDefKey;//当前的任务key
|
|||
|
|||
public static String REJECT_TO_START ="1"; |
|||
public static String REJECT_TO_LAST ="2"; |
|||
public static String REJECT_TO_TARGET ="3"; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class UserInfo { |
|||
private String username; |
|||
private String password; |
|||
|
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
import org.camunda.bpm.engine.identity.User; |
|||
import org.camunda.bpm.engine.impl.db.DbEntity; |
|||
import org.camunda.bpm.engine.impl.db.HasDbRevision; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/22. |
|||
*/ |
|||
@Data |
|||
public class UserInfoEntity implements User, Serializable, DbEntity, HasDbRevision { |
|||
|
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
protected String id; |
|||
protected int revision; |
|||
protected String firstName; |
|||
protected String lastName; |
|||
protected String email; |
|||
protected String password; |
|||
protected String newPassword; |
|||
protected String salt; |
|||
protected Date lockExpirationTime; |
|||
protected int attempts; |
|||
|
|||
@Override |
|||
public Object getPersistentState() { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public int getRevisionNext() { |
|||
return 0; |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/22. |
|||
*/ |
|||
@Data |
|||
public class UserRequestEntity { |
|||
|
|||
private String id ; |
|||
|
|||
//0代表用户 1代表组 2代表租户
|
|||
private String type ; |
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.fs.camunda.bpm.example.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/28. |
|||
*/ |
|||
@Data |
|||
public class UserResponseEntity implements Serializable { |
|||
|
|||
private Boolean isExist; |
|||
|
|||
private String desc; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.fs.camunda.bpm.example.mapper; |
|||
|
|||
import com.fs.camunda.bpm.example.entity.UserInfoEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.Map; |
|||
|
|||
@Mapper |
|||
public interface UserMapper { |
|||
|
|||
|
|||
|
|||
// int findUserById(String userId);
|
|||
int findUserById(String userId); |
|||
|
|||
int findGroupById(String groupId); |
|||
|
|||
int findTenantById(String tenantId); |
|||
|
|||
int updateGroupAndUser(@Param("groupId")String groupId,@Param("titleGroupId")String titleGroupId, @Param("userId")String userId); |
|||
} |
@ -0,0 +1,19 @@ |
|||
package com.fs.camunda.bpm.example.service; |
|||
|
|||
import com.fs.camunda.bpm.example.entity.ObjectMemberEntity; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/22. |
|||
*/ |
|||
|
|||
public interface UserService { |
|||
|
|||
Boolean checkUser(String userId); |
|||
|
|||
Boolean checkGroup(String groupId); |
|||
|
|||
Boolean checkTenant(String tenantId); |
|||
|
|||
Boolean updateGroupAndUser(ObjectMemberEntity membership); |
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.fs.camunda.bpm.example.service.impl; |
|||
|
|||
import com.fs.camunda.bpm.example.conf.BasicPathAuthConfig; |
|||
import com.fs.camunda.bpm.example.entity.ObjectMemberEntity; |
|||
import com.fs.camunda.bpm.example.entity.UserInfoEntity; |
|||
import com.fs.camunda.bpm.example.mapper.UserMapper; |
|||
import com.fs.camunda.bpm.example.service.UserService; |
|||
import com.google.common.base.Strings; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* Created by cheeyy on 2020/6/22. |
|||
*/ |
|||
@Service |
|||
public class UserServiceImpl implements UserService { |
|||
|
|||
@Autowired |
|||
UserMapper userMapper; |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|||
|
|||
|
|||
public Boolean checkUser(String userId){ |
|||
|
|||
int count = userMapper.findUserById(userId); |
|||
if(count > 0 ){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public Boolean checkGroup(String groupId) { |
|||
int count = userMapper.findGroupById(groupId); |
|||
if(count > 0 ){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public Boolean checkTenant(String tenantId) { |
|||
int count = userMapper.findTenantById(tenantId); |
|||
if(count > 0 ){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public Boolean updateGroupAndUser(ObjectMemberEntity membership) { |
|||
if(Strings.isNullOrEmpty(membership.getUserId())||Strings.isNullOrEmpty(membership.getOriginGroupId()) |
|||
||Strings.isNullOrEmpty(membership.getTitleGroupId())){ |
|||
logger.info("传入的用户id、原始组id、目标组id 必须都有值!目前参数为:"+membership.toString()); |
|||
return false; |
|||
} |
|||
int count = userMapper.updateGroupAndUser(membership.getOriginGroupId(),membership.getTitleGroupId(),membership.getUserId()); |
|||
if(count>0){ |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.fs.camunda.bpm.example.utils; |
|||
|
|||
import com.fs.camunda.bpm.example.conf.DemoWebMvcConfig; |
|||
import org.camunda.bpm.engine.identity.User; |
|||
import org.camunda.bpm.engine.impl.digest._apacheCommonsCodec.Base64; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpSession; |
|||
|
|||
/** |
|||
* 用户工具类 |
|||
* |
|||
* @author cheey |
|||
*/ |
|||
public class UserUtil { |
|||
|
|||
private static final Logger logger = LoggerFactory.getLogger(UserUtil.class); |
|||
|
|||
|
|||
public static final String USER = "user"; |
|||
|
|||
/** |
|||
* 设置用户到session |
|||
* |
|||
* @param session |
|||
* @param user |
|||
*/ |
|||
public static void saveUserToSession(HttpSession session, User user) { |
|||
session.setAttribute(USER, user); |
|||
} |
|||
|
|||
/** |
|||
* 从Session获取当前用户信息 |
|||
* |
|||
* @param session |
|||
* @return |
|||
*/ |
|||
public static User getUserFromSession(HttpSession session) { |
|||
Object attribute = session.getAttribute(USER); |
|||
return attribute == null ? null : (User) attribute; |
|||
} |
|||
|
|||
public static String getLoginUserName(HttpServletRequest request){ |
|||
try{ |
|||
String header = request.getHeader("Authorization"); |
|||
String encodedCredentials = header.substring(6); |
|||
String decodedCredentials = new String(Base64.decodeBase64(encodedCredentials),"UTF-8"); |
|||
int firstColonIndex = decodedCredentials.indexOf(":"); |
|||
String userName = decodedCredentials.substring(0, firstColonIndex); |
|||
return userName; |
|||
}catch (Exception e){ |
|||
logger.error("获取登录名异常,原因:"+e); |
|||
return ""; |
|||
} |
|||
} |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
<process-application |
|||
xmlns="http://www.camunda.org/schema/1.0/ProcessApplication" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|||
|
|||
<process-archive> |
|||
<process-engine>default</process-engine> |
|||
<properties> |
|||
<property name="isDeleteUponUndeploy">false</property> |
|||
<property name="isScanForProcessDefinitions">false</property> |
|||
</properties> |
|||
</process-archive> |
|||
|
|||
</process-application> |
@ -0,0 +1,65 @@ |
|||
server: |
|||
port: 8080 |
|||
tomcat: |
|||
uri-encoding: UTF-8 |
|||
servlet: |
|||
context-path: /fs-workflow |
|||
register-default-servlet: true |
|||
|
|||
spring: |
|||
application: |
|||
name: camunda-demo-service |
|||
jersey: |
|||
application-path: /engine-rest |
|||
datasource: |
|||
# driver-class-name: com.mysql.jdbc.Driver |
|||
# url: jdbc:mysql://127.0.0.1:3306/camunda_demo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&useOldAliasMetadataBehavior=true |
|||
# username: root |
|||
# password: root |
|||
driver-class-name: org.postgresql.Driver |
|||
url: jdbc:postgres://10.8.30.156:5432/camunda04 |
|||
username: FashionAdmin |
|||
password: 123456 |
|||
tomcat: |
|||
max-idle: 10 |
|||
max-wait: 10000 |
|||
min-idle: 5 |
|||
initial-size: 5 |
|||
validation-query: SELECT 1 |
|||
test-on-borrow: false |
|||
test-while-idle: true |
|||
time-between-eviction-runs-millis: 18800 |
|||
|
|||
camunda.bpm: |
|||
filter: |
|||
create: All tasks# |
|||
# database: |
|||
# type: PostgreSQL |
|||
admin-user: |
|||
id: admin |
|||
password: fs-workflow |
|||
firstName: admin |
|||
auto-deployment-enabled: false |
|||
webapp: |
|||
index-redirect-enabled: true |
|||
application-path: /camunda-workflow |
|||
|
|||
mybatis: |
|||
type-aliases-package: com.fs.camunda.bpm.example.entity |
|||
mapper-locations: classpath:mybatis/mapper/*.xml |
|||
|
|||
#logging: |
|||
# path: /logs/ |
|||
# file: springbootdemo.log |
|||
# pattern: |
|||
# console: %d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n |
|||
# file: %d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n |
|||
# |
|||
logging: |
|||
level: |
|||
com: |
|||
fs: |
|||
camunda: |
|||
bpm: |
|||
example: |
|||
mapper: debug |
@ -0,0 +1,61 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration> |
|||
<!-- 属性文件 --> |
|||
<contextName>logback</contextName> |
|||
<!--定义日志文件的存储地址目录--> |
|||
<property name="LOG_HOME" value="logs/"/> |
|||
|
|||
<!-- 默认的控制台日志输出,一般生产环境都是后台启动,这个没太大作用 --> |
|||
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<!--<Encoding>UTF-8</Encoding>--> |
|||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|||
<level>info</level> |
|||
</filter> |
|||
<encoder> |
|||
<!--<pattern>%d %p (%file:%line\)- %m%n</pattern>--> |
|||
<!--格式化输出:%d:表示日期 %thread:表示线程名 %-5level:级别从左显示5个字符宽度 %msg:日志消息 %n:是换行符--> |
|||
<pattern> %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger) - %cyan(%msg%n)</pattern> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
<!-- 配置文件轮转 --> |
|||
<appender name="logfile" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
|||
<fileNamePattern>${LOG_HOME}logback.%d{yyyy-MM-dd}[%i].log</fileNamePattern> |
|||
<maxFileSize>10mb</maxFileSize> |
|||
<maxHistory>30</maxHistory> |
|||
<totalSizeCap>1GB</totalSizeCap> |
|||
</rollingPolicy> |
|||
<encoder> |
|||
<!--格式化输出:%d:表示日期 %thread:表示线程名 %-5level:级别从左显示5个字符宽度 %msg:日志消息 %n:是换行符--> |
|||
<pattern>文件记录-%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger - %msg%n</pattern> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
|
|||
<logger name="org.apache.ibatis" level="DEBUG"> |
|||
<appender-ref ref="stdout" /> |
|||
</logger> |
|||
|
|||
<logger name="java.sql" level="DEBUG"> |
|||
<appender-ref ref="stdout" /> |
|||
</logger> |
|||
<logger name="java.sql.Connection" level="DEBUG"/> |
|||
<logger name="java.sql.Statement" level="DEBUG"/> |
|||
<logger name="java.sql.PreparedStatement" level="DEBUG"/> |
|||
<logger name="org.apache.http" level="ERROR" /> |
|||
<logger name="com.netflix.discovery" level="ERROR"/> |
|||
|
|||
|
|||
|
|||
<!-- <logger name="org.activiti.engine.impl.persistence.entity" level="DEBUG" /> --> |
|||
|
|||
<!-- root 默认日志配置 , 注意这里的级别哈!小心生产环境用DEBUG,压爆你的磁盘! --> |
|||
<!-- TRACE , DEBUG , INFO , WARN , ERROR , FATAL , OFF --> |
|||
<root level="info"> |
|||
<appender-ref ref="logfile" /> |
|||
<appender-ref ref="stdout" /> |
|||
</root> |
|||
</configuration> |
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.fs.camunda.bpm.example.mapper.UserMapper"> |
|||
|
|||
|
|||
<select id="findUserById" parameterType="java.lang.String" resultType="int"> |
|||
|
|||
select count(*) from act_id_user where 1=1 |
|||
<if test="_parameter != null"> |
|||
and id_ = #{userId} |
|||
</if> |
|||
|
|||
</select> |
|||
|
|||
<select id="findGroupById" parameterType="string" resultType="int"> |
|||
select count(*) from act_id_group where 1=1 |
|||
<if test="_parameter != null"> |
|||
and id_ = #{groupId} |
|||
</if> |
|||
</select> |
|||
|
|||
<select id="findTenantById" parameterType="string" resultType="int"> |
|||
select count(*) from act_id_tenant where 1=1 |
|||
<if test="_parameter != null"> |
|||
and id_ = #{tenantId} |
|||
</if> |
|||
</select> |
|||
|
|||
|
|||
<update id="updateGroupAndUser" parameterType="string" > |
|||
update act_id_membership set group_id_ = #{titleGroupId} where group_id_ = #{groupId} and user_id_ = #{userId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,6 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="en"> |
|||
<head> |
|||
<meta http-equiv="refresh" content="1; url=/webjars/swagger-ui/3.20.9/index.html?docExpansion=false&url=/swagger.json"> |
|||
</head> |
|||
</html> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,683 @@ |
|||
/** |
|||
* outline styles |
|||
*/ |
|||
|
|||
.djs-outline { |
|||
fill: none; |
|||
visibility: hidden; |
|||
} |
|||
|
|||
.djs-element.hover .djs-outline, |
|||
.djs-element.selected .djs-outline { |
|||
visibility: visible; |
|||
shape-rendering: crispEdges; |
|||
stroke-dasharray: 3,3; |
|||
} |
|||
|
|||
.djs-element.selected .djs-outline { |
|||
stroke: #8888FF; |
|||
stroke-width: 1px; |
|||
} |
|||
|
|||
.djs-element.hover .djs-outline { |
|||
stroke: #FF8888; |
|||
stroke-width: 1px; |
|||
} |
|||
|
|||
.djs-shape.connect-ok .djs-visual > :nth-child(1) { |
|||
fill: #DCFECC /* light-green */ !important; |
|||
} |
|||
|
|||
.djs-shape.connect-not-ok .djs-visual > :nth-child(1), |
|||
.djs-shape.drop-not-ok .djs-visual > :nth-child(1) { |
|||
fill: #f9dee5 /* light-red */ !important; |
|||
} |
|||
|
|||
.djs-shape.new-parent .djs-visual > :nth-child(1) { |
|||
fill: #F7F9FF !important; |
|||
} |
|||
|
|||
svg.drop-not-ok { |
|||
background: #f9dee5 /* light-red */ !important; |
|||
} |
|||
|
|||
svg.new-parent { |
|||
background: #F7F9FF /* light-blue */ !important; |
|||
} |
|||
|
|||
.djs-connection.connect-ok .djs-visual > :nth-child(1), |
|||
.djs-connection.drop-ok .djs-visual > :nth-child(1) { |
|||
stroke: #90DD5F /* light-green */ !important; |
|||
} |
|||
|
|||
.djs-connection.connect-not-ok .djs-visual > :nth-child(1), |
|||
.djs-connection.drop-not-ok .djs-visual > :nth-child(1) { |
|||
stroke: #E56283 /* light-red */ !important; |
|||
} |
|||
|
|||
.drop-not-ok, |
|||
.connect-not-ok { |
|||
cursor: not-allowed; |
|||
} |
|||
|
|||
.djs-element.attach-ok .djs-visual > :nth-child(1) { |
|||
stroke-width: 5px !important; |
|||
stroke: rgba(255, 116, 0, 0.7) !important; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Selection box style |
|||
* |
|||
*/ |
|||
.djs-lasso-overlay { |
|||
fill: rgb(255, 116, 0); |
|||
fill-opacity: 0.1; |
|||
|
|||
stroke-dasharray: 5 1 3 1; |
|||
stroke: rgb(255, 116, 0); |
|||
|
|||
shape-rendering: crispEdges; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
/** |
|||
* Resize styles |
|||
*/ |
|||
.djs-resize-overlay { |
|||
fill: none; |
|||
|
|||
stroke-dasharray: 5 1 3 1; |
|||
stroke: rgb(255, 116, 0); |
|||
|
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-resizer-hit { |
|||
fill: none; |
|||
pointer-events: all; |
|||
} |
|||
|
|||
.djs-resizer-visual { |
|||
fill: white; |
|||
stroke-width: 1px; |
|||
stroke: black; |
|||
shape-rendering: crispEdges; |
|||
stroke-opacity: 0.2; |
|||
} |
|||
|
|||
.djs-cursor-resize-nwse, |
|||
.djs-resizer-nw, |
|||
.djs-resizer-se { |
|||
cursor: nwse-resize; |
|||
} |
|||
|
|||
.djs-cursor-resize-nesw, |
|||
.djs-resizer-ne, |
|||
.djs-resizer-sw { |
|||
cursor: nesw-resize; |
|||
} |
|||
|
|||
.djs-shape.djs-resizing > .djs-outline { |
|||
visibility: hidden !important; |
|||
} |
|||
|
|||
.djs-shape.djs-resizing > .djs-resizer { |
|||
visibility: hidden; |
|||
} |
|||
|
|||
.djs-dragger > .djs-resizer { |
|||
visibility: hidden; |
|||
} |
|||
|
|||
/** |
|||
* drag styles |
|||
*/ |
|||
.djs-dragger .djs-visual circle, |
|||
.djs-dragger .djs-visual path, |
|||
.djs-dragger .djs-visual polygon, |
|||
.djs-dragger .djs-visual polyline, |
|||
.djs-dragger .djs-visual rect, |
|||
.djs-dragger .djs-visual text { |
|||
fill: none !important; |
|||
stroke: rgb(255, 116, 0) !important; |
|||
} |
|||
|
|||
.djs-dragging { |
|||
opacity: 0.3; |
|||
} |
|||
|
|||
.djs-dragging, |
|||
.djs-dragging > * { |
|||
pointer-events: none !important; |
|||
} |
|||
|
|||
.djs-dragging .djs-context-pad, |
|||
.djs-dragging .djs-outline { |
|||
display: none !important; |
|||
} |
|||
|
|||
/** |
|||
* no pointer events for visual |
|||
*/ |
|||
.djs-visual, |
|||
.djs-outline { |
|||
pointer-events: none; |
|||
} |
|||
|
|||
/** |
|||
* all pointer events for hit shape |
|||
*/ |
|||
.djs-shape .djs-hit { |
|||
pointer-events: all; |
|||
} |
|||
|
|||
.djs-connection .djs-hit { |
|||
pointer-events: stroke; |
|||
} |
|||
|
|||
/** |
|||
* shape / connection basic styles |
|||
*/ |
|||
.djs-connection .djs-visual { |
|||
stroke-width: 2px; |
|||
fill: none; |
|||
} |
|||
|
|||
.djs-cursor-grab { |
|||
cursor: -webkit-grab; |
|||
cursor: -moz-grab; |
|||
cursor: grab; |
|||
} |
|||
|
|||
.djs-cursor-grabbing { |
|||
cursor: -webkit-grabbing; |
|||
cursor: -moz-grabbing; |
|||
cursor: grabbing; |
|||
} |
|||
|
|||
.djs-cursor-crosshair { |
|||
cursor: crosshair; |
|||
} |
|||
|
|||
.djs-cursor-move { |
|||
cursor: move; |
|||
} |
|||
|
|||
.djs-cursor-resize-ns { |
|||
cursor: ns-resize; |
|||
} |
|||
|
|||
.djs-cursor-resize-ew { |
|||
cursor: ew-resize; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* snapping |
|||
*/ |
|||
.djs-snap-line { |
|||
stroke: rgb(255, 195, 66); |
|||
stroke: rgba(255, 195, 66, 0.50); |
|||
stroke-linecap: round; |
|||
stroke-width: 2px; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
/** |
|||
* snapping |
|||
*/ |
|||
.djs-crosshair { |
|||
stroke: #555; |
|||
stroke-linecap: round; |
|||
stroke-width: 1px; |
|||
pointer-events: none; |
|||
shape-rendering: crispEdges; |
|||
stroke-dasharray: 5, 5; |
|||
} |
|||
|
|||
/** |
|||
* palette |
|||
*/ |
|||
|
|||
.djs-palette { |
|||
position: absolute; |
|||
left: 20px; |
|||
top: 20px; |
|||
|
|||
box-sizing: border-box; |
|||
width: 48px; |
|||
} |
|||
|
|||
.djs-palette .separator { |
|||
margin: 0 5px; |
|||
padding-top: 5px; |
|||
|
|||
border: none; |
|||
border-bottom: solid 1px #DDD; |
|||
|
|||
clear: both; |
|||
} |
|||
|
|||
.djs-palette .entry:before { |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
.djs-palette .djs-palette-toggle { |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.djs-palette .entry, |
|||
.djs-palette .djs-palette-toggle { |
|||
color: #333; |
|||
font-size: 30px; |
|||
|
|||
text-align: center; |
|||
} |
|||
|
|||
.djs-palette .entry { |
|||
float: left; |
|||
} |
|||
|
|||
.djs-palette .entry img { |
|||
max-width: 100%; |
|||
} |
|||
|
|||
.djs-palette .djs-palette-entries:after { |
|||
content: ''; |
|||
display: table; |
|||
clear: both; |
|||
} |
|||
|
|||
.djs-palette .djs-palette-toggle:hover { |
|||
background: #666; |
|||
} |
|||
|
|||
.djs-palette .entry:hover { |
|||
color: rgb(255, 116, 0); |
|||
} |
|||
|
|||
.djs-palette .highlighted-entry { |
|||
color: rgb(255, 116, 0) !important; |
|||
} |
|||
|
|||
.djs-palette .entry, |
|||
.djs-palette .djs-palette-toggle { |
|||
width: 46px; |
|||
height: 46px; |
|||
line-height: 46px; |
|||
cursor: default; |
|||
} |
|||
|
|||
/** |
|||
* Palette open / two-column layout is controlled via |
|||
* classes on the palette. Events to hook into palette |
|||
* changed life-cycle are available in addition. |
|||
*/ |
|||
.djs-palette.two-column.open { |
|||
width: 94px; |
|||
} |
|||
|
|||
.djs-palette:not(.open) .djs-palette-entries { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-palette:not(.open) { |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.djs-palette.open .djs-palette-toggle { |
|||
display: none; |
|||
} |
|||
|
|||
/** |
|||
* context-pad |
|||
*/ |
|||
.djs-overlay-context-pad { |
|||
width: 72px; |
|||
} |
|||
|
|||
.djs-context-pad { |
|||
position: absolute; |
|||
display: none; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-context-pad .entry { |
|||
width: 22px; |
|||
height: 22px; |
|||
text-align: center; |
|||
display: inline-block; |
|||
font-size: 22px; |
|||
margin: 0 2px 2px 0; |
|||
|
|||
border-radius: 3px; |
|||
|
|||
cursor: default; |
|||
|
|||
background-color: #FEFEFE; |
|||
box-shadow: 0 0 2px 1px #FEFEFE; |
|||
pointer-events: all; |
|||
} |
|||
|
|||
.djs-context-pad .entry:before { |
|||
vertical-align: top; |
|||
} |
|||
|
|||
.djs-context-pad .entry:hover { |
|||
background: rgb(255, 252, 176); |
|||
} |
|||
|
|||
.djs-context-pad.open { |
|||
display: block; |
|||
} |
|||
|
|||
/** |
|||
* popup styles |
|||
*/ |
|||
.djs-popup .entry { |
|||
line-height: 20px; |
|||
white-space: nowrap; |
|||
cursor: default; |
|||
} |
|||
|
|||
/* larger font for prefixed icons */ |
|||
.djs-popup .entry:before { |
|||
vertical-align: middle; |
|||
font-size: 20px; |
|||
} |
|||
|
|||
.djs-popup .entry > span { |
|||
vertical-align: middle; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.djs-popup .entry:hover, |
|||
.djs-popup .entry.active:hover { |
|||
background: rgb(255, 252, 176); |
|||
} |
|||
|
|||
.djs-popup .entry.disabled { |
|||
background: inherit; |
|||
} |
|||
|
|||
.djs-popup .djs-popup-header .entry { |
|||
display: inline-block; |
|||
padding: 2px 3px 2px 3px; |
|||
|
|||
border: solid 1px transparent; |
|||
border-radius: 3px; |
|||
} |
|||
|
|||
.djs-popup .djs-popup-header .entry.active { |
|||
color: rgb(255, 116, 0); |
|||
border: solid 1px rgb(255, 116, 0); |
|||
background-color: #F6F6F6; |
|||
} |
|||
|
|||
.djs-popup-body .entry { |
|||
padding: 4px 10px 4px 5px; |
|||
} |
|||
|
|||
.djs-popup-body .entry > span { |
|||
margin-left: 5px; |
|||
} |
|||
|
|||
.djs-popup-body { |
|||
background-color: #FEFEFE; |
|||
} |
|||
|
|||
.djs-popup-header { |
|||
border-bottom: 1px solid #DDD; |
|||
} |
|||
|
|||
.djs-popup-header .entry { |
|||
margin: 1px; |
|||
margin-left: 3px; |
|||
} |
|||
|
|||
.djs-popup-header .entry:last-child { |
|||
margin-right: 3px; |
|||
} |
|||
|
|||
/** |
|||
* popup / palette styles |
|||
*/ |
|||
.djs-popup, .djs-palette { |
|||
background: #FAFAFA; |
|||
border: solid 1px #CCC; |
|||
border-radius: 2px; |
|||
} |
|||
|
|||
/** |
|||
* touch |
|||
*/ |
|||
|
|||
.djs-shape, |
|||
.djs-connection { |
|||
touch-action: none; |
|||
} |
|||
|
|||
.djs-segment-dragger, |
|||
.djs-bendpoint { |
|||
display: none; |
|||
} |
|||
|
|||
/** |
|||
* bendpoints |
|||
*/ |
|||
.djs-segment-dragger .djs-visual { |
|||
fill: rgba(255, 255, 121, 0.2); |
|||
stroke-width: 1px; |
|||
stroke-opacity: 1; |
|||
stroke: rgba(255, 255, 121, 0.3); |
|||
} |
|||
|
|||
.djs-bendpoint .djs-visual { |
|||
fill: rgba(255, 255, 121, 0.8); |
|||
stroke-width: 1px; |
|||
stroke-opacity: 0.5; |
|||
stroke: black; |
|||
} |
|||
|
|||
.djs-segment-dragger:hover, |
|||
.djs-bendpoints.hover .djs-segment-dragger, |
|||
.djs-bendpoints.selected .djs-segment-dragger, |
|||
.djs-bendpoint:hover, |
|||
.djs-bendpoints.hover .djs-bendpoint, |
|||
.djs-bendpoints.selected .djs-bendpoint { |
|||
display: block; |
|||
} |
|||
|
|||
.djs-drag-active .djs-bendpoints * { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-bendpoints:not(.hover) .floating { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-segment-dragger:hover .djs-visual, |
|||
.djs-segment-dragger.djs-dragging .djs-visual, |
|||
.djs-bendpoint:hover .djs-visual, |
|||
.djs-bendpoint.floating .djs-visual { |
|||
fill: yellow; |
|||
stroke-opacity: 0.5; |
|||
stroke: black; |
|||
} |
|||
|
|||
.djs-bendpoint.floating .djs-hit { |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-segment-dragger .djs-hit, |
|||
.djs-bendpoint .djs-hit { |
|||
pointer-events: all; |
|||
fill: none; |
|||
} |
|||
|
|||
.djs-segment-dragger.horizontal .djs-hit { |
|||
cursor: ns-resize; |
|||
} |
|||
|
|||
.djs-segment-dragger.vertical .djs-hit { |
|||
cursor: ew-resize; |
|||
} |
|||
|
|||
.djs-segment-dragger.djs-dragging .djs-hit { |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-updating, |
|||
.djs-updating > * { |
|||
pointer-events: none !important; |
|||
} |
|||
|
|||
.djs-updating .djs-context-pad, |
|||
.djs-updating .djs-outline, |
|||
.djs-updating .djs-bendpoint, |
|||
.connect-ok .djs-bendpoint, |
|||
.connect-not-ok .djs-bendpoint, |
|||
.drop-ok .djs-bendpoint, |
|||
.drop-not-ok .djs-bendpoint { |
|||
display: none !important; |
|||
} |
|||
|
|||
.djs-segment-dragger.djs-dragging, |
|||
.djs-bendpoint.djs-dragging { |
|||
display: block; |
|||
opacity: 1.0; |
|||
} |
|||
|
|||
.djs-segment-dragger.djs-dragging .djs-visual, |
|||
.djs-bendpoint.djs-dragging .djs-visual { |
|||
fill: yellow; |
|||
stroke-opacity: 0.5; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* tooltips |
|||
*/ |
|||
.djs-tooltip-error { |
|||
font-size: 11px; |
|||
line-height: 18px; |
|||
text-align: left; |
|||
|
|||
padding: 5px; |
|||
|
|||
opacity: 0.7; |
|||
} |
|||
|
|||
.djs-tooltip-error > * { |
|||
width: 160px; |
|||
|
|||
background: rgb(252, 236, 240); |
|||
color: rgb(158, 76, 76); |
|||
padding: 3px 7px; |
|||
border-radius: 5px; |
|||
border-left: solid 5px rgb(174, 73, 73); |
|||
} |
|||
|
|||
.djs-tooltip-error:hover { |
|||
opacity: 1; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* search pad |
|||
*/ |
|||
.djs-search-container { |
|||
position: absolute; |
|||
top: 20px; |
|||
left: 0; |
|||
right: 0; |
|||
margin-left: auto; |
|||
margin-right: auto; |
|||
|
|||
width: 25%; |
|||
min-width: 300px; |
|||
max-width: 400px; |
|||
z-index: 10; |
|||
|
|||
font-size: 1.05em; |
|||
opacity: 0.9; |
|||
background: #FAFAFA; |
|||
border: solid 1px #CCC; |
|||
border-radius: 2px; |
|||
} |
|||
|
|||
.djs-search-container:not(.open) { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-search-input input { |
|||
font-size: 1.05em; |
|||
width: 100%; |
|||
padding: 6px 10px; |
|||
border: 1px solid #ccc; |
|||
} |
|||
|
|||
.djs-search-input input:focus { |
|||
outline: none; |
|||
border-color: #52B415; |
|||
} |
|||
|
|||
.djs-search-results { |
|||
position: relative; |
|||
overflow-y: auto; |
|||
max-height: 200px; |
|||
} |
|||
|
|||
.djs-search-results:hover { |
|||
/*background: #fffdd7;*/ |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.djs-search-result { |
|||
width: 100%; |
|||
padding: 6px 10px; |
|||
background: white; |
|||
border-bottom: solid 1px #AAA; |
|||
border-radius: 1px; |
|||
} |
|||
|
|||
.djs-search-highlight { |
|||
color: black; |
|||
} |
|||
|
|||
.djs-search-result-primary { |
|||
margin: 0 0 10px; |
|||
} |
|||
|
|||
.djs-search-result-secondary { |
|||
font-family: monospace; |
|||
margin: 0; |
|||
} |
|||
|
|||
.djs-search-result:hover { |
|||
background: #fdffd6; |
|||
} |
|||
|
|||
.djs-search-result-selected { |
|||
background: #fffcb0; |
|||
} |
|||
|
|||
.djs-search-result-selected:hover { |
|||
background: #f7f388; |
|||
} |
|||
|
|||
.djs-search-overlay { |
|||
background: yellow; |
|||
opacity: 0.3; |
|||
} |
|||
|
|||
/** |
|||
* hidden styles |
|||
*/ |
|||
.djs-element-hidden, |
|||
.djs-element-hidden .djs-hit, |
|||
.djs-element-hidden .djs-outline, |
|||
.djs-label-hidden .djs-label { |
|||
display: none !important; |
|||
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,51 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh-CN"> |
|||
<head> |
|||
<title>Camunda Modeler</title> |
|||
|
|||
<link rel="stylesheet" href="css/diagram-js.css" /> |
|||
<link rel="stylesheet" href="vendor/bpmn-font/css/bpmn-embedded.css" /> |
|||
<link rel="stylesheet" href="css/app.css" /> |
|||
</head> |
|||
<body> |
|||
<div class="content with-diagram" id="js-drop-zone"> |
|||
|
|||
<div class="message intro"> |
|||
<div class="note"> |
|||
Drop BPMN diagram from your desktop or <a id="js-create-diagram" href>create a new diagram</a> to get started. |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="message error"> |
|||
<div class="note"> |
|||
<p>Ooops, we could not display the BPMN 2.0 diagram.</p> |
|||
|
|||
<div class="details"> |
|||
<span>Import Error Details</span> |
|||
<pre></pre> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="canvas" id="js-canvas"></div> |
|||
<div class="properties-panel-parent" id="js-properties-panel"></div> |
|||
</div> |
|||
|
|||
<ul class="buttons"> |
|||
<li> |
|||
download |
|||
</li> |
|||
<li> |
|||
<a id="js-download-diagram" href title="download BPMN diagram"> |
|||
BPMN diagram |
|||
</a> |
|||
</li> |
|||
<li> |
|||
<a id="js-download-svg" href title="download as SVG image"> |
|||
SVG image |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
|
|||
<script src="index.js"></script> |
|||
</html> |
@ -0,0 +1,107 @@ |
|||
|
|||
.bpmn-icon-screw-wrench:before { content: '\e800'; } /* '' */ |
|||
.bpmn-icon-trash:before { content: '\e801'; } /* '' */ |
|||
.bpmn-icon-conditional-flow:before { content: '\e802'; } /* '' */ |
|||
.bpmn-icon-default-flow:before { content: '\e803'; } /* '' */ |
|||
.bpmn-icon-gateway-parallel:before { content: '\e804'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-cancel:before { content: '\e805'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\e806'; } /* '' */ |
|||
.bpmn-icon-start-event-compensation:before { content: '\e807'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\e808'; } /* '' */ |
|||
.bpmn-icon-loop-marker:before { content: '\e809'; } /* '' */ |
|||
.bpmn-icon-parallel-mi-marker:before { content: '\e80a'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-signal:before { content: '\e80b'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\e80c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\e80d'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-compensation:before { content: '\e80e'; } /* '' */ |
|||
.bpmn-icon-gateway-xor:before { content: '\e80f'; } /* '' */ |
|||
.bpmn-icon-connection:before { content: '\e810'; } /* '' */ |
|||
.bpmn-icon-end-event-cancel:before { content: '\e811'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-condition:before { content: '\e812'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\e813'; } /* '' */ |
|||
.bpmn-icon-start-event-condition:before { content: '\e814'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-timer:before { content: '\e815'; } /* '' */ |
|||
.bpmn-icon-sequential-mi-marker:before { content: '\e816'; } /* '' */ |
|||
.bpmn-icon-user-task:before { content: '\e817'; } /* '' */ |
|||
.bpmn-icon-business-rule:before { content: '\e818'; } /* '' */ |
|||
.bpmn-icon-sub-process-marker:before { content: '\e819'; } /* '' */ |
|||
.bpmn-icon-start-event-parallel-multiple:before { content: '\e81a'; } /* '' */ |
|||
.bpmn-icon-start-event-error:before { content: '\e81b'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-signal:before { content: '\e81c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-error:before { content: '\e81d'; } /* '' */ |
|||
.bpmn-icon-end-event-compensation:before { content: '\e81e'; } /* '' */ |
|||
.bpmn-icon-subprocess-collapsed:before { content: '\e81f'; } /* '' */ |
|||
.bpmn-icon-subprocess-expanded:before { content: '\e820'; } /* '' */ |
|||
.bpmn-icon-task:before { content: '\e821'; } /* '' */ |
|||
.bpmn-icon-end-event-error:before { content: '\e822'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-escalation:before { content: '\e823'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-timer:before { content: '\e824'; } /* '' */ |
|||
.bpmn-icon-start-event-escalation:before { content: '\e825'; } /* '' */ |
|||
.bpmn-icon-start-event-signal:before { content: '\e826'; } /* '' */ |
|||
.bpmn-icon-business-rule-task:before { content: '\e827'; } /* '' */ |
|||
.bpmn-icon-manual:before { content: '\e828'; } /* '' */ |
|||
.bpmn-icon-receive:before { content: '\e829'; } /* '' */ |
|||
.bpmn-icon-call-activity:before { content: '\e82a'; } /* '' */ |
|||
.bpmn-icon-start-event-timer:before { content: '\e82b'; } /* '' */ |
|||
.bpmn-icon-start-event-message:before { content: '\e82c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-none:before { content: '\e82d'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-link:before { content: '\e82e'; } /* '' */ |
|||
.bpmn-icon-end-event-escalation:before { content: '\e82f'; } /* '' */ |
|||
.bpmn-icon-text-annotation:before { content: '\e830'; } /* '' */ |
|||
.bpmn-icon-bpmn-io:before { content: '\e831'; } /* '' */ |
|||
.bpmn-icon-gateway-complex:before { content: '\e832'; } /* '' */ |
|||
.bpmn-icon-gateway-eventbased:before { content: '\e833'; } /* '' */ |
|||
.bpmn-icon-gateway-none:before { content: '\e834'; } /* '' */ |
|||
.bpmn-icon-gateway-or:before { content: '\e835'; } /* '' */ |
|||
.bpmn-icon-end-event-terminate:before { content: '\e836'; } /* '' */ |
|||
.bpmn-icon-end-event-signal:before { content: '\e837'; } /* '' */ |
|||
.bpmn-icon-end-event-none:before { content: '\e838'; } /* '' */ |
|||
.bpmn-icon-end-event-multiple:before { content: '\e839'; } /* '' */ |
|||
.bpmn-icon-end-event-message:before { content: '\e83a'; } /* '' */ |
|||
.bpmn-icon-end-event-link:before { content: '\e83b'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-message:before { content: '\e83c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-compensation:before { content: '\e83d'; } /* '' */ |
|||
.bpmn-icon-start-event-multiple:before { content: '\e83e'; } /* '' */ |
|||
.bpmn-icon-script:before { content: '\e83f'; } /* '' */ |
|||
.bpmn-icon-manual-task:before { content: '\e840'; } /* '' */ |
|||
.bpmn-icon-send:before { content: '\e841'; } /* '' */ |
|||
.bpmn-icon-service:before { content: '\e842'; } /* '' */ |
|||
.bpmn-icon-receive-task:before { content: '\e843'; } /* '' */ |
|||
.bpmn-icon-user:before { content: '\e844'; } /* '' */ |
|||
.bpmn-icon-start-event-none:before { content: '\e845'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-escalation:before { content: '\e846'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-multiple:before { content: '\e847'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\e848'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-link:before { content: '\e849'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-condition:before { content: '\e84a'; } /* '' */ |
|||
.bpmn-icon-data-object:before { content: '\e84b'; } /* '' */ |
|||
.bpmn-icon-script-task:before { content: '\e84c'; } /* '' */ |
|||
.bpmn-icon-send-task:before { content: '\e84d'; } /* '' */ |
|||
.bpmn-icon-data-store:before { content: '\e84e'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\e84f'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-message:before { content: '\e850'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\e851'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\e852'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-multiple:before { content: '\e853'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-message:before { content: '\e854'; } /* '' */ |
|||
.bpmn-icon-ad-hoc-marker:before { content: '\e855'; } /* '' */ |
|||
.bpmn-icon-service-task:before { content: '\e856'; } /* '' */ |
|||
.bpmn-icon-task-none:before { content: '\e857'; } /* '' */ |
|||
.bpmn-icon-compensation-marker:before { content: '\e858'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\e859'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-signal:before { content: '\e85a'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\e85b'; } /* '' */ |
|||
.bpmn-icon-participant:before { content: '\e85c'; } /* '' */ |
|||
.bpmn-icon-event-subprocess-expanded:before { content: '\e85d'; } /* '' */ |
|||
.bpmn-icon-lane-insert-below:before { content: '\e85e'; } /* '' */ |
|||
.bpmn-icon-space-tool:before { content: '\e85f'; } /* '' */ |
|||
.bpmn-icon-connection-multi:before { content: '\e860'; } /* '' */ |
|||
.bpmn-icon-lane:before { content: '\e861'; } /* '' */ |
|||
.bpmn-icon-lasso-tool:before { content: '\e862'; } /* '' */ |
|||
.bpmn-icon-lane-insert-above:before { content: '\e863'; } /* '' */ |
|||
.bpmn-icon-lane-divide-three:before { content: '\e864'; } /* '' */ |
|||
.bpmn-icon-lane-divide-two:before { content: '\e865'; } /* '' */ |
|||
.bpmn-icon-data-input:before { content: '\e866'; } /* '' */ |
|||
.bpmn-icon-data-output:before { content: '\e867'; } /* '' */ |
|||
.bpmn-icon-hand-tool:before { content: '\e868'; } /* '' */ |
|||
.bpmn-icon-transaction:before { content: '\e8c4'; } /* '' */ |
File diff suppressed because one or more lines are too long
@ -0,0 +1,162 @@ |
|||
@font-face { |
|||
font-family: 'bpmn'; |
|||
src: url('../font/bpmn.eot?70672887'); |
|||
src: url('../font/bpmn.eot?70672887#iefix') format('embedded-opentype'), |
|||
url('../font/bpmn.woff?70672887') format('woff'), |
|||
url('../font/bpmn.ttf?70672887') format('truetype'), |
|||
url('../font/bpmn.svg?70672887#bpmn') format('svg'); |
|||
font-weight: normal; |
|||
font-style: normal; |
|||
} |
|||
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */ |
|||
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */ |
|||
/* |
|||
@media screen and (-webkit-min-device-pixel-ratio:0) { |
|||
@font-face { |
|||
font-family: 'bpmn'; |
|||
src: url('../font/bpmn.svg?70672887#bpmn') format('svg'); |
|||
} |
|||
} |
|||
*/ |
|||
|
|||
[class^="bpmn-icon-"]:before, [class*=" bpmn-icon-"]:before { |
|||
font-family: "bpmn"; |
|||
font-style: normal; |
|||
font-weight: normal; |
|||
speak: none; |
|||
|
|||
display: inline-block; |
|||
text-decoration: inherit; |
|||
width: 1em; |
|||
/* margin-right: .2em; */ |
|||
text-align: center; |
|||
/* opacity: .8; */ |
|||
|
|||
/* For safety - reset parent styles, that can break glyph codes*/ |
|||
font-variant: normal; |
|||
text-transform: none; |
|||
|
|||
/* fix buttons height, for twitter bootstrap */ |
|||
line-height: 1em; |
|||
|
|||
/* Animation center compensation - margins should be symmetric */ |
|||
/* remove if not needed */ |
|||
/* margin-left: .2em; */ |
|||
|
|||
/* you can be more comfortable with increased icons size */ |
|||
/* font-size: 120%; */ |
|||
|
|||
/* Font smoothing. That was taken from TWBS */ |
|||
-webkit-font-smoothing: antialiased; |
|||
-moz-osx-font-smoothing: grayscale; |
|||
|
|||
/* Uncomment for 3D effect */ |
|||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ |
|||
} |
|||
|
|||
.bpmn-icon-screw-wrench:before { content: '\e800'; } /* '' */ |
|||
.bpmn-icon-trash:before { content: '\e801'; } /* '' */ |
|||
.bpmn-icon-conditional-flow:before { content: '\e802'; } /* '' */ |
|||
.bpmn-icon-default-flow:before { content: '\e803'; } /* '' */ |
|||
.bpmn-icon-gateway-parallel:before { content: '\e804'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-cancel:before { content: '\e805'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\e806'; } /* '' */ |
|||
.bpmn-icon-start-event-compensation:before { content: '\e807'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\e808'; } /* '' */ |
|||
.bpmn-icon-loop-marker:before { content: '\e809'; } /* '' */ |
|||
.bpmn-icon-parallel-mi-marker:before { content: '\e80a'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-signal:before { content: '\e80b'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\e80c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\e80d'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-compensation:before { content: '\e80e'; } /* '' */ |
|||
.bpmn-icon-gateway-xor:before { content: '\e80f'; } /* '' */ |
|||
.bpmn-icon-connection:before { content: '\e810'; } /* '' */ |
|||
.bpmn-icon-end-event-cancel:before { content: '\e811'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-condition:before { content: '\e812'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\e813'; } /* '' */ |
|||
.bpmn-icon-start-event-condition:before { content: '\e814'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-timer:before { content: '\e815'; } /* '' */ |
|||
.bpmn-icon-sequential-mi-marker:before { content: '\e816'; } /* '' */ |
|||
.bpmn-icon-user-task:before { content: '\e817'; } /* '' */ |
|||
.bpmn-icon-business-rule:before { content: '\e818'; } /* '' */ |
|||
.bpmn-icon-sub-process-marker:before { content: '\e819'; } /* '' */ |
|||
.bpmn-icon-start-event-parallel-multiple:before { content: '\e81a'; } /* '' */ |
|||
.bpmn-icon-start-event-error:before { content: '\e81b'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-signal:before { content: '\e81c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-error:before { content: '\e81d'; } /* '' */ |
|||
.bpmn-icon-end-event-compensation:before { content: '\e81e'; } /* '' */ |
|||
.bpmn-icon-subprocess-collapsed:before { content: '\e81f'; } /* '' */ |
|||
.bpmn-icon-subprocess-expanded:before { content: '\e820'; } /* '' */ |
|||
.bpmn-icon-task:before { content: '\e821'; } /* '' */ |
|||
.bpmn-icon-end-event-error:before { content: '\e822'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-escalation:before { content: '\e823'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-timer:before { content: '\e824'; } /* '' */ |
|||
.bpmn-icon-start-event-escalation:before { content: '\e825'; } /* '' */ |
|||
.bpmn-icon-start-event-signal:before { content: '\e826'; } /* '' */ |
|||
.bpmn-icon-business-rule-task:before { content: '\e827'; } /* '' */ |
|||
.bpmn-icon-manual:before { content: '\e828'; } /* '' */ |
|||
.bpmn-icon-receive:before { content: '\e829'; } /* '' */ |
|||
.bpmn-icon-call-activity:before { content: '\e82a'; } /* '' */ |
|||
.bpmn-icon-start-event-timer:before { content: '\e82b'; } /* '' */ |
|||
.bpmn-icon-start-event-message:before { content: '\e82c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-none:before { content: '\e82d'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-link:before { content: '\e82e'; } /* '' */ |
|||
.bpmn-icon-end-event-escalation:before { content: '\e82f'; } /* '' */ |
|||
.bpmn-icon-text-annotation:before { content: '\e830'; } /* '' */ |
|||
.bpmn-icon-bpmn-io:before { content: '\e831'; } /* '' */ |
|||
.bpmn-icon-gateway-complex:before { content: '\e832'; } /* '' */ |
|||
.bpmn-icon-gateway-eventbased:before { content: '\e833'; } /* '' */ |
|||
.bpmn-icon-gateway-none:before { content: '\e834'; } /* '' */ |
|||
.bpmn-icon-gateway-or:before { content: '\e835'; } /* '' */ |
|||
.bpmn-icon-end-event-terminate:before { content: '\e836'; } /* '' */ |
|||
.bpmn-icon-end-event-signal:before { content: '\e837'; } /* '' */ |
|||
.bpmn-icon-end-event-none:before { content: '\e838'; } /* '' */ |
|||
.bpmn-icon-end-event-multiple:before { content: '\e839'; } /* '' */ |
|||
.bpmn-icon-end-event-message:before { content: '\e83a'; } /* '' */ |
|||
.bpmn-icon-end-event-link:before { content: '\e83b'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-message:before { content: '\e83c'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-compensation:before { content: '\e83d'; } /* '' */ |
|||
.bpmn-icon-start-event-multiple:before { content: '\e83e'; } /* '' */ |
|||
.bpmn-icon-script:before { content: '\e83f'; } /* '' */ |
|||
.bpmn-icon-manual-task:before { content: '\e840'; } /* '' */ |
|||
.bpmn-icon-send:before { content: '\e841'; } /* '' */ |
|||
.bpmn-icon-service:before { content: '\e842'; } /* '' */ |
|||
.bpmn-icon-receive-task:before { content: '\e843'; } /* '' */ |
|||
.bpmn-icon-user:before { content: '\e844'; } /* '' */ |
|||
.bpmn-icon-start-event-none:before { content: '\e845'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-escalation:before { content: '\e846'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-multiple:before { content: '\e847'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\e848'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-link:before { content: '\e849'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-condition:before { content: '\e84a'; } /* '' */ |
|||
.bpmn-icon-data-object:before { content: '\e84b'; } /* '' */ |
|||
.bpmn-icon-script-task:before { content: '\e84c'; } /* '' */ |
|||
.bpmn-icon-send-task:before { content: '\e84d'; } /* '' */ |
|||
.bpmn-icon-data-store:before { content: '\e84e'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\e84f'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-message:before { content: '\e850'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\e851'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\e852'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-multiple:before { content: '\e853'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-message:before { content: '\e854'; } /* '' */ |
|||
.bpmn-icon-ad-hoc-marker:before { content: '\e855'; } /* '' */ |
|||
.bpmn-icon-service-task:before { content: '\e856'; } /* '' */ |
|||
.bpmn-icon-task-none:before { content: '\e857'; } /* '' */ |
|||
.bpmn-icon-compensation-marker:before { content: '\e858'; } /* '' */ |
|||
.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\e859'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-throw-signal:before { content: '\e85a'; } /* '' */ |
|||
.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\e85b'; } /* '' */ |
|||
.bpmn-icon-participant:before { content: '\e85c'; } /* '' */ |
|||
.bpmn-icon-event-subprocess-expanded:before { content: '\e85d'; } /* '' */ |
|||
.bpmn-icon-lane-insert-below:before { content: '\e85e'; } /* '' */ |
|||
.bpmn-icon-space-tool:before { content: '\e85f'; } /* '' */ |
|||
.bpmn-icon-connection-multi:before { content: '\e860'; } /* '' */ |
|||
.bpmn-icon-lane:before { content: '\e861'; } /* '' */ |
|||
.bpmn-icon-lasso-tool:before { content: '\e862'; } /* '' */ |
|||
.bpmn-icon-lane-insert-above:before { content: '\e863'; } /* '' */ |
|||
.bpmn-icon-lane-divide-three:before { content: '\e864'; } /* '' */ |
|||
.bpmn-icon-lane-divide-two:before { content: '\e865'; } /* '' */ |
|||
.bpmn-icon-data-input:before { content: '\e866'; } /* '' */ |
|||
.bpmn-icon-data-output:before { content: '\e867'; } /* '' */ |
|||
.bpmn-icon-hand-tool:before { content: '\e868'; } /* '' */ |
|||
.bpmn-icon-transaction:before { content: '\e8c4'; } /* '' */ |
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,683 @@ |
|||
/** |
|||
* outline styles |
|||
*/ |
|||
|
|||
.djs-outline { |
|||
fill: none; |
|||
visibility: hidden; |
|||
} |
|||
|
|||
.djs-element.hover .djs-outline, |
|||
.djs-element.selected .djs-outline { |
|||
visibility: visible; |
|||
shape-rendering: crispEdges; |
|||
stroke-dasharray: 3,3; |
|||
} |
|||
|
|||
.djs-element.selected .djs-outline { |
|||
stroke: #8888FF; |
|||
stroke-width: 1px; |
|||
} |
|||
|
|||
.djs-element.hover .djs-outline { |
|||
stroke: #FF8888; |
|||
stroke-width: 1px; |
|||
} |
|||
|
|||
.djs-shape.connect-ok .djs-visual > :nth-child(1) { |
|||
fill: #DCFECC /* light-green */ !important; |
|||
} |
|||
|
|||
.djs-shape.connect-not-ok .djs-visual > :nth-child(1), |
|||
.djs-shape.drop-not-ok .djs-visual > :nth-child(1) { |
|||
fill: #f9dee5 /* light-red */ !important; |
|||
} |
|||
|
|||
.djs-shape.new-parent .djs-visual > :nth-child(1) { |
|||
fill: #F7F9FF !important; |
|||
} |
|||
|
|||
svg.drop-not-ok { |
|||
background: #f9dee5 /* light-red */ !important; |
|||
} |
|||
|
|||
svg.new-parent { |
|||
background: #F7F9FF /* light-blue */ !important; |
|||
} |
|||
|
|||
.djs-connection.connect-ok .djs-visual > :nth-child(1), |
|||
.djs-connection.drop-ok .djs-visual > :nth-child(1) { |
|||
stroke: #90DD5F /* light-green */ !important; |
|||
} |
|||
|
|||
.djs-connection.connect-not-ok .djs-visual > :nth-child(1), |
|||
.djs-connection.drop-not-ok .djs-visual > :nth-child(1) { |
|||
stroke: #E56283 /* light-red */ !important; |
|||
} |
|||
|
|||
.drop-not-ok, |
|||
.connect-not-ok { |
|||
cursor: not-allowed; |
|||
} |
|||
|
|||
.djs-element.attach-ok .djs-visual > :nth-child(1) { |
|||
stroke-width: 5px !important; |
|||
stroke: rgba(255, 116, 0, 0.7) !important; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Selection box style |
|||
* |
|||
*/ |
|||
.djs-lasso-overlay { |
|||
fill: rgb(255, 116, 0); |
|||
fill-opacity: 0.1; |
|||
|
|||
stroke-dasharray: 5 1 3 1; |
|||
stroke: rgb(255, 116, 0); |
|||
|
|||
shape-rendering: crispEdges; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
/** |
|||
* Resize styles |
|||
*/ |
|||
.djs-resize-overlay { |
|||
fill: none; |
|||
|
|||
stroke-dasharray: 5 1 3 1; |
|||
stroke: rgb(255, 116, 0); |
|||
|
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-resizer-hit { |
|||
fill: none; |
|||
pointer-events: all; |
|||
} |
|||
|
|||
.djs-resizer-visual { |
|||
fill: white; |
|||
stroke-width: 1px; |
|||
stroke: black; |
|||
shape-rendering: crispEdges; |
|||
stroke-opacity: 0.2; |
|||
} |
|||
|
|||
.djs-cursor-resize-nwse, |
|||
.djs-resizer-nw, |
|||
.djs-resizer-se { |
|||
cursor: nwse-resize; |
|||
} |
|||
|
|||
.djs-cursor-resize-nesw, |
|||
.djs-resizer-ne, |
|||
.djs-resizer-sw { |
|||
cursor: nesw-resize; |
|||
} |
|||
|
|||
.djs-shape.djs-resizing > .djs-outline { |
|||
visibility: hidden !important; |
|||
} |
|||
|
|||
.djs-shape.djs-resizing > .djs-resizer { |
|||
visibility: hidden; |
|||
} |
|||
|
|||
.djs-dragger > .djs-resizer { |
|||
visibility: hidden; |
|||
} |
|||
|
|||
/** |
|||
* drag styles |
|||
*/ |
|||
.djs-dragger .djs-visual circle, |
|||
.djs-dragger .djs-visual path, |
|||
.djs-dragger .djs-visual polygon, |
|||
.djs-dragger .djs-visual polyline, |
|||
.djs-dragger .djs-visual rect, |
|||
.djs-dragger .djs-visual text { |
|||
fill: none !important; |
|||
stroke: rgb(255, 116, 0) !important; |
|||
} |
|||
|
|||
.djs-dragging { |
|||
opacity: 0.3; |
|||
} |
|||
|
|||
.djs-dragging, |
|||
.djs-dragging > * { |
|||
pointer-events: none !important; |
|||
} |
|||
|
|||
.djs-dragging .djs-context-pad, |
|||
.djs-dragging .djs-outline { |
|||
display: none !important; |
|||
} |
|||
|
|||
/** |
|||
* no pointer events for visual |
|||
*/ |
|||
.djs-visual, |
|||
.djs-outline { |
|||
pointer-events: none; |
|||
} |
|||
|
|||
/** |
|||
* all pointer events for hit shape |
|||
*/ |
|||
.djs-shape .djs-hit { |
|||
pointer-events: all; |
|||
} |
|||
|
|||
.djs-connection .djs-hit { |
|||
pointer-events: stroke; |
|||
} |
|||
|
|||
/** |
|||
* shape / connection basic styles |
|||
*/ |
|||
.djs-connection .djs-visual { |
|||
stroke-width: 2px; |
|||
fill: none; |
|||
} |
|||
|
|||
.djs-cursor-grab { |
|||
cursor: -webkit-grab; |
|||
cursor: -moz-grab; |
|||
cursor: grab; |
|||
} |
|||
|
|||
.djs-cursor-grabbing { |
|||
cursor: -webkit-grabbing; |
|||
cursor: -moz-grabbing; |
|||
cursor: grabbing; |
|||
} |
|||
|
|||
.djs-cursor-crosshair { |
|||
cursor: crosshair; |
|||
} |
|||
|
|||
.djs-cursor-move { |
|||
cursor: move; |
|||
} |
|||
|
|||
.djs-cursor-resize-ns { |
|||
cursor: ns-resize; |
|||
} |
|||
|
|||
.djs-cursor-resize-ew { |
|||
cursor: ew-resize; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* snapping |
|||
*/ |
|||
.djs-snap-line { |
|||
stroke: rgb(255, 195, 66); |
|||
stroke: rgba(255, 195, 66, 0.50); |
|||
stroke-linecap: round; |
|||
stroke-width: 2px; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
/** |
|||
* snapping |
|||
*/ |
|||
.djs-crosshair { |
|||
stroke: #555; |
|||
stroke-linecap: round; |
|||
stroke-width: 1px; |
|||
pointer-events: none; |
|||
shape-rendering: crispEdges; |
|||
stroke-dasharray: 5, 5; |
|||
} |
|||
|
|||
/** |
|||
* palette |
|||
*/ |
|||
|
|||
.djs-palette { |
|||
position: absolute; |
|||
left: 20px; |
|||
top: 20px; |
|||
|
|||
box-sizing: border-box; |
|||
width: 48px; |
|||
} |
|||
|
|||
.djs-palette .separator { |
|||
margin: 0 5px; |
|||
padding-top: 5px; |
|||
|
|||
border: none; |
|||
border-bottom: solid 1px #DDD; |
|||
|
|||
clear: both; |
|||
} |
|||
|
|||
.djs-palette .entry:before { |
|||
vertical-align: middle; |
|||
} |
|||
|
|||
.djs-palette .djs-palette-toggle { |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.djs-palette .entry, |
|||
.djs-palette .djs-palette-toggle { |
|||
color: #333; |
|||
font-size: 30px; |
|||
|
|||
text-align: center; |
|||
} |
|||
|
|||
.djs-palette .entry { |
|||
float: left; |
|||
} |
|||
|
|||
.djs-palette .entry img { |
|||
max-width: 100%; |
|||
} |
|||
|
|||
.djs-palette .djs-palette-entries:after { |
|||
content: ''; |
|||
display: table; |
|||
clear: both; |
|||
} |
|||
|
|||
.djs-palette .djs-palette-toggle:hover { |
|||
background: #666; |
|||
} |
|||
|
|||
.djs-palette .entry:hover { |
|||
color: rgb(255, 116, 0); |
|||
} |
|||
|
|||
.djs-palette .highlighted-entry { |
|||
color: rgb(255, 116, 0) !important; |
|||
} |
|||
|
|||
.djs-palette .entry, |
|||
.djs-palette .djs-palette-toggle { |
|||
width: 46px; |
|||
height: 46px; |
|||
line-height: 46px; |
|||
cursor: default; |
|||
} |
|||
|
|||
/** |
|||
* Palette open / two-column layout is controlled via |
|||
* classes on the palette. Events to hook into palette |
|||
* changed life-cycle are available in addition. |
|||
*/ |
|||
.djs-palette.two-column.open { |
|||
width: 94px; |
|||
} |
|||
|
|||
.djs-palette:not(.open) .djs-palette-entries { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-palette:not(.open) { |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.djs-palette.open .djs-palette-toggle { |
|||
display: none; |
|||
} |
|||
|
|||
/** |
|||
* context-pad |
|||
*/ |
|||
.djs-overlay-context-pad { |
|||
width: 72px; |
|||
} |
|||
|
|||
.djs-context-pad { |
|||
position: absolute; |
|||
display: none; |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-context-pad .entry { |
|||
width: 22px; |
|||
height: 22px; |
|||
text-align: center; |
|||
display: inline-block; |
|||
font-size: 22px; |
|||
margin: 0 2px 2px 0; |
|||
|
|||
border-radius: 3px; |
|||
|
|||
cursor: default; |
|||
|
|||
background-color: #FEFEFE; |
|||
box-shadow: 0 0 2px 1px #FEFEFE; |
|||
pointer-events: all; |
|||
} |
|||
|
|||
.djs-context-pad .entry:before { |
|||
vertical-align: top; |
|||
} |
|||
|
|||
.djs-context-pad .entry:hover { |
|||
background: rgb(255, 252, 176); |
|||
} |
|||
|
|||
.djs-context-pad.open { |
|||
display: block; |
|||
} |
|||
|
|||
/** |
|||
* popup styles |
|||
*/ |
|||
.djs-popup .entry { |
|||
line-height: 20px; |
|||
white-space: nowrap; |
|||
cursor: default; |
|||
} |
|||
|
|||
/* larger font for prefixed icons */ |
|||
.djs-popup .entry:before { |
|||
vertical-align: middle; |
|||
font-size: 20px; |
|||
} |
|||
|
|||
.djs-popup .entry > span { |
|||
vertical-align: middle; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.djs-popup .entry:hover, |
|||
.djs-popup .entry.active:hover { |
|||
background: rgb(255, 252, 176); |
|||
} |
|||
|
|||
.djs-popup .entry.disabled { |
|||
background: inherit; |
|||
} |
|||
|
|||
.djs-popup .djs-popup-header .entry { |
|||
display: inline-block; |
|||
padding: 2px 3px 2px 3px; |
|||
|
|||
border: solid 1px transparent; |
|||
border-radius: 3px; |
|||
} |
|||
|
|||
.djs-popup .djs-popup-header .entry.active { |
|||
color: rgb(255, 116, 0); |
|||
border: solid 1px rgb(255, 116, 0); |
|||
background-color: #F6F6F6; |
|||
} |
|||
|
|||
.djs-popup-body .entry { |
|||
padding: 4px 10px 4px 5px; |
|||
} |
|||
|
|||
.djs-popup-body .entry > span { |
|||
margin-left: 5px; |
|||
} |
|||
|
|||
.djs-popup-body { |
|||
background-color: #FEFEFE; |
|||
} |
|||
|
|||
.djs-popup-header { |
|||
border-bottom: 1px solid #DDD; |
|||
} |
|||
|
|||
.djs-popup-header .entry { |
|||
margin: 1px; |
|||
margin-left: 3px; |
|||
} |
|||
|
|||
.djs-popup-header .entry:last-child { |
|||
margin-right: 3px; |
|||
} |
|||
|
|||
/** |
|||
* popup / palette styles |
|||
*/ |
|||
.djs-popup, .djs-palette { |
|||
background: #FAFAFA; |
|||
border: solid 1px #CCC; |
|||
border-radius: 2px; |
|||
} |
|||
|
|||
/** |
|||
* touch |
|||
*/ |
|||
|
|||
.djs-shape, |
|||
.djs-connection { |
|||
touch-action: none; |
|||
} |
|||
|
|||
.djs-segment-dragger, |
|||
.djs-bendpoint { |
|||
display: none; |
|||
} |
|||
|
|||
/** |
|||
* bendpoints |
|||
*/ |
|||
.djs-segment-dragger .djs-visual { |
|||
fill: rgba(255, 255, 121, 0.2); |
|||
stroke-width: 1px; |
|||
stroke-opacity: 1; |
|||
stroke: rgba(255, 255, 121, 0.3); |
|||
} |
|||
|
|||
.djs-bendpoint .djs-visual { |
|||
fill: rgba(255, 255, 121, 0.8); |
|||
stroke-width: 1px; |
|||
stroke-opacity: 0.5; |
|||
stroke: black; |
|||
} |
|||
|
|||
.djs-segment-dragger:hover, |
|||
.djs-bendpoints.hover .djs-segment-dragger, |
|||
.djs-bendpoints.selected .djs-segment-dragger, |
|||
.djs-bendpoint:hover, |
|||
.djs-bendpoints.hover .djs-bendpoint, |
|||
.djs-bendpoints.selected .djs-bendpoint { |
|||
display: block; |
|||
} |
|||
|
|||
.djs-drag-active .djs-bendpoints * { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-bendpoints:not(.hover) .floating { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-segment-dragger:hover .djs-visual, |
|||
.djs-segment-dragger.djs-dragging .djs-visual, |
|||
.djs-bendpoint:hover .djs-visual, |
|||
.djs-bendpoint.floating .djs-visual { |
|||
fill: yellow; |
|||
stroke-opacity: 0.5; |
|||
stroke: black; |
|||
} |
|||
|
|||
.djs-bendpoint.floating .djs-hit { |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-segment-dragger .djs-hit, |
|||
.djs-bendpoint .djs-hit { |
|||
pointer-events: all; |
|||
fill: none; |
|||
} |
|||
|
|||
.djs-segment-dragger.horizontal .djs-hit { |
|||
cursor: ns-resize; |
|||
} |
|||
|
|||
.djs-segment-dragger.vertical .djs-hit { |
|||
cursor: ew-resize; |
|||
} |
|||
|
|||
.djs-segment-dragger.djs-dragging .djs-hit { |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.djs-updating, |
|||
.djs-updating > * { |
|||
pointer-events: none !important; |
|||
} |
|||
|
|||
.djs-updating .djs-context-pad, |
|||
.djs-updating .djs-outline, |
|||
.djs-updating .djs-bendpoint, |
|||
.connect-ok .djs-bendpoint, |
|||
.connect-not-ok .djs-bendpoint, |
|||
.drop-ok .djs-bendpoint, |
|||
.drop-not-ok .djs-bendpoint { |
|||
display: none !important; |
|||
} |
|||
|
|||
.djs-segment-dragger.djs-dragging, |
|||
.djs-bendpoint.djs-dragging { |
|||
display: block; |
|||
opacity: 1.0; |
|||
} |
|||
|
|||
.djs-segment-dragger.djs-dragging .djs-visual, |
|||
.djs-bendpoint.djs-dragging .djs-visual { |
|||
fill: yellow; |
|||
stroke-opacity: 0.5; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* tooltips |
|||
*/ |
|||
.djs-tooltip-error { |
|||
font-size: 11px; |
|||
line-height: 18px; |
|||
text-align: left; |
|||
|
|||
padding: 5px; |
|||
|
|||
opacity: 0.7; |
|||
} |
|||
|
|||
.djs-tooltip-error > * { |
|||
width: 160px; |
|||
|
|||
background: rgb(252, 236, 240); |
|||
color: rgb(158, 76, 76); |
|||
padding: 3px 7px; |
|||
border-radius: 5px; |
|||
border-left: solid 5px rgb(174, 73, 73); |
|||
} |
|||
|
|||
.djs-tooltip-error:hover { |
|||
opacity: 1; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* search pad |
|||
*/ |
|||
.djs-search-container { |
|||
position: absolute; |
|||
top: 20px; |
|||
left: 0; |
|||
right: 0; |
|||
margin-left: auto; |
|||
margin-right: auto; |
|||
|
|||
width: 25%; |
|||
min-width: 300px; |
|||
max-width: 400px; |
|||
z-index: 10; |
|||
|
|||
font-size: 1.05em; |
|||
opacity: 0.9; |
|||
background: #FAFAFA; |
|||
border: solid 1px #CCC; |
|||
border-radius: 2px; |
|||
} |
|||
|
|||
.djs-search-container:not(.open) { |
|||
display: none; |
|||
} |
|||
|
|||
.djs-search-input input { |
|||
font-size: 1.05em; |
|||
width: 100%; |
|||
padding: 6px 10px; |
|||
border: 1px solid #ccc; |
|||
} |
|||
|
|||
.djs-search-input input:focus { |
|||
outline: none; |
|||
border-color: #52B415; |
|||
} |
|||
|
|||
.djs-search-results { |
|||
position: relative; |
|||
overflow-y: auto; |
|||
max-height: 200px; |
|||
} |
|||
|
|||
.djs-search-results:hover { |
|||
/*background: #fffdd7;*/ |
|||
cursor: pointer; |
|||
} |
|||
|
|||
.djs-search-result { |
|||
width: 100%; |
|||
padding: 6px 10px; |
|||
background: white; |
|||
border-bottom: solid 1px #AAA; |
|||
border-radius: 1px; |
|||
} |
|||
|
|||
.djs-search-highlight { |
|||
color: black; |
|||
} |
|||
|
|||
.djs-search-result-primary { |
|||
margin: 0 0 10px; |
|||
} |
|||
|
|||
.djs-search-result-secondary { |
|||
font-family: monospace; |
|||
margin: 0; |
|||
} |
|||
|
|||
.djs-search-result:hover { |
|||
background: #fdffd6; |
|||
} |
|||
|
|||
.djs-search-result-selected { |
|||
background: #fffcb0; |
|||
} |
|||
|
|||
.djs-search-result-selected:hover { |
|||
background: #f7f388; |
|||
} |
|||
|
|||
.djs-search-overlay { |
|||
background: yellow; |
|||
opacity: 0.3; |
|||
} |
|||
|
|||
/** |
|||
* hidden styles |
|||
*/ |
|||
.djs-element-hidden, |
|||
.djs-element-hidden .djs-hit, |
|||
.djs-element-hidden .djs-outline, |
|||
.djs-label-hidden .djs-label { |
|||
display: none !important; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.fs.camunda.bpm.example; |
|||
|
|||
/*import org.junit.jupiter.api.Test; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
|
|||
@SpringBootTest |
|||
class ExampleApplicationTests { |
|||
|
|||
@Test |
|||
void contextLoads() { |
|||
} |
|||
|
|||
}*/ |
Loading…
Reference in new issue