06-10-2015 04:13 PM
@Configuration
public class ActivitiConfiguration {
@Bean
public SpringProcessEngineConfiguration processEngineConfiguration(DataSource dataSource,
PlatformTransactionManager transactionManager,
EntityManagerFactory entityManagerFactory) {
SpringProcessEngineConfiguration engineConfiguration = new SpringProcessEngineConfiguration();
engineConfiguration.setDataSource(dataSource);
engineConfiguration.setTransactionManager(transactionManager);
engineConfiguration.setJpaEntityManagerFactory(entityManagerFactory);
engineConfiguration.setHistory(HistoryLevel.FULL.getKey());
engineConfiguration.setDeploymentResources(deploymentResources());
engineConfiguration.setDeploymentMode("single-resource");
return engineConfiguration;
}
private Resource[] deploymentResources() {
Resource[] processResource = new Resource[1];
processResource[0] = new ClassPathResource("bpm/activiti/XPTOProcess.bpmn20.xml");
return processResource;
}
@Bean
public ProcessEngine processEngine(SpringProcessEngineConfiguration springProcessEngineConfiguration,
ApplicationContext applicationContext) throws Exception {
ProcessEngineFactoryBean processEngineFactoryBean = new ProcessEngineFactoryBean();
processEngineFactoryBean.setProcessEngineConfiguration(springProcessEngineConfiguration);
processEngineFactoryBean.setApplicationContext(applicationContext);
return processEngineFactoryBean.getObject();
}
}
06-10-2015 04:17 PM
06-10-2015 05:55 PM
06-12-2015 06:06 AM
06-16-2015 01:31 PM
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
<process id="conselhoSuperiorProcess" isExecutable="true">
<extensionElements>
<activiti:executionListener expression="${documentoRecebidoFacade.validar(idDocumento)}" event="start" />
</extensionElements>
<startEvent id="startProcess" name="Iniciar Análises"></startEvent>
<serviceTask id="bloquearDocumento" name="Bloquear Documento" activiti:expression="${documentoAnaliseFacade.bloquearDocumento(idDocumento)}" activiti:resultVariableName="documento"></serviceTask>
<userTask id="analisarComplementacaoDados" name="Analisar Complementação de Dados">
<extensionElements>
<activiti:taskListener event="complete" expression="${documentoRecebidoFacade.validar(idDocumento)}"></activiti:taskListener>
</extensionElements>
</userTask>
<userTask id="enviarParaDistribuicao" name="Enviar para Distribuição"></userTask>
<endEvent id="endProcess"></endEvent>
<userTask id="analisarPrevencao" name="Analisar Prevenção">
<extensionElements>
<activiti:taskListener event="complete" expression="${documentoRecebidoFacade.validar(idDocumento)}"></activiti:taskListener>
</extensionElements>
</userTask>
<parallelGateway id="parallelGatewayAnalisesFim"></parallelGateway>
<parallelGateway id="parallelGatewayAnalisesInicio"></parallelGateway>
<userTask id="analisarImpedimento" name="Analisar Impedimento">
<extensionElements>
<activiti:taskListener event="complete" expression="${documentoRecebidoFacade.validar(idDocumento)}"></activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sequenceFlowAnalisarComplementacaoDadosOut" sourceRef="analisarComplementacaoDados" targetRef="parallelGatewayAnalisesFim"></sequenceFlow>
<sequenceFlow id="sequenceFlowAnalisarComplementacaoDadosIn" sourceRef="parallelGatewayAnalisesInicio" targetRef="analisarComplementacaoDados"></sequenceFlow>
<sequenceFlow id="sequenceFlowAnalisarPrevencaoIn" sourceRef="parallelGatewayAnalisesInicio" targetRef="analisarPrevencao"></sequenceFlow>
<sequenceFlow id="sequenceFlowAnalisarImpedimentoIn" sourceRef="parallelGatewayAnalisesInicio" targetRef="analisarImpedimento"></sequenceFlow>
<sequenceFlow id="sequenceFlowBloquearDocumentoIn" sourceRef="startProcess" targetRef="bloquearDocumento"></sequenceFlow>
<sequenceFlow id="sequenceFlowBloquearDocumentoOut" sourceRef="bloquearDocumento" targetRef="parallelGatewayAnalisesInicio"></sequenceFlow>
<sequenceFlow id="sequenceFlowAnalisarPrevencaoOut" sourceRef="analisarPrevencao" targetRef="parallelGatewayAnalisesFim"></sequenceFlow>
<sequenceFlow id="sequenceFlowAnalisarImpedimentoOut" sourceRef="analisarImpedimento" targetRef="parallelGatewayAnalisesFim"></sequenceFlow>
<sequenceFlow id="sequenceFlowEnviarParaDistribuicaoIn" sourceRef="parallelGatewayAnalisesFim" targetRef="enviarParaDistribuicao"></sequenceFlow>
<sequenceFlow id="sequenceFlowEnviarParaDistribuicaoOut" sourceRef="enviarParaDistribuicao" targetRef="endProcess"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_conselhoSuperiorProcess">
<bpmndi:BPMNPlane bpmnElement="conselhoSuperiorProcess" id="BPMNPlane_conselhoSuperiorProcess">
<bpmndi:BPMNShape bpmnElement="startProcess" id="BPMNShape_startProcess">
<omgdc:Bounds height="30.0" width="30.0" x="90.0" y="209.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="bloquearDocumento" id="BPMNShape_bloquearDocumento">
<omgdc:Bounds height="80.0" width="100.0" x="195.0" y="184.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="analisarComplementacaoDados" id="BPMNShape_analisarComplementacaoDados">
<omgdc:Bounds height="80.0" width="100.0" x="435.0" y="60.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="enviarParaDistribuicao" id="BPMNShape_enviarParaDistribuicao">
<omgdc:Bounds height="80.0" width="100.0" x="675.0" y="184.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endProcess" id="BPMNShape_endProcess">
<omgdc:Bounds height="28.0" width="28.0" x="840.0" y="210.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="analisarPrevencao" id="BPMNShape_analisarPrevencao">
<omgdc:Bounds height="80.0" width="100.0" x="435.0" y="184.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="parallelGatewayAnalisesFim" id="BPMNShape_parallelGatewayAnalisesFim">
<omgdc:Bounds height="40.0" width="40.0" x="585.7159423828125" y="204.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="parallelGatewayAnalisesInicio" id="BPMNShape_parallelGatewayAnalisesInicio">
<omgdc:Bounds height="40.0" width="40.0" x="345.0" y="204.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="analisarImpedimento" id="BPMNShape_analisarImpedimento">
<omgdc:Bounds height="80.0" width="100.0" x="435.0" y="300.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowAnalisarComplementacaoDadosOut" id="BPMNEdge_sequenceFlowAnalisarComplementacaoDadosOut">
<omgdi:waypoint x="535.0" y="100.0"></omgdi:waypoint>
<omgdi:waypoint x="606.0" y="100.0"></omgdi:waypoint>
<omgdi:waypoint x="605.7616534132751" y="204.04571103046257"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowAnalisarImpedimentoOut" id="BPMNEdge_sequenceFlowAnalisarImpedimentoOut">
<omgdi:waypoint x="535.0" y="340.0"></omgdi:waypoint>
<omgdi:waypoint x="605.7159423828125" y="340.0"></omgdi:waypoint>
<omgdi:waypoint x="605.7159423828125" y="244.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowEnviarParaDistribuicaoOut" id="BPMNEdge_sequenceFlowEnviarParaDistribuicaoOut">
<omgdi:waypoint x="775.0" y="224.0"></omgdi:waypoint>
<omgdi:waypoint x="840.0" y="224.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowBloquearDocumentoOut" id="BPMNEdge_sequenceFlowBloquearDocumentoOut">
<omgdi:waypoint x="295.0" y="224.0"></omgdi:waypoint>
<omgdi:waypoint x="345.0" y="224.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowAnalisarPrevencaoOut" id="BPMNEdge_sequenceFlowAnalisarPrevencaoOut">
<omgdi:waypoint x="535.0" y="224.0"></omgdi:waypoint>
<omgdi:waypoint x="585.7159423828125" y="224.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowAnalisarImpedimentoIn" id="BPMNEdge_sequenceFlowAnalisarImpedimentoIn">
<omgdi:waypoint x="365.5" y="243.5"></omgdi:waypoint>
<omgdi:waypoint x="365.5" y="340.0"></omgdi:waypoint>
<omgdi:waypoint x="435.0" y="340.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowEnviarParaDistribuicaoIn" id="BPMNEdge_sequenceFlowEnviarParaDistribuicaoIn">
<omgdi:waypoint x="625.7159423828125" y="224.0"></omgdi:waypoint>
<omgdi:waypoint x="675.0" y="224.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowAnalisarComplementacaoDadosIn" id="BPMNEdge_sequenceFlowAnalisarComplementacaoDadosIn">
<omgdi:waypoint x="365.0" y="204.0"></omgdi:waypoint>
<omgdi:waypoint x="365.0" y="100.0"></omgdi:waypoint>
<omgdi:waypoint x="435.0" y="100.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowBloquearDocumentoIn" id="BPMNEdge_sequenceFlowBloquearDocumentoIn">
<omgdi:waypoint x="120.0" y="224.0"></omgdi:waypoint>
<omgdi:waypoint x="195.0" y="224.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sequenceFlowAnalisarPrevencaoIn" id="BPMNEdge_sequenceFlowAnalisarPrevencaoIn">
<omgdi:waypoint x="385.0" y="224.0"></omgdi:waypoint>
<omgdi:waypoint x="435.0" y="224.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
06-17-2015 06:37 AM
06-17-2015 10:36 AM
06-17-2015 10:42 AM
06-18-2015 03:04 AM
06-19-2015 01:03 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.