Hello community,
I studied the code of the xml sample files (the already deployed ones) in Activiti Explorer and created my own workflow model in eclipse with the acitivi plugin. Firstly I built my process as an acitivi diagram and then went into the xml file of the diagram and added workflow parts like in the sample files.
Now I want to upload my XML file in the Activiti Explorer. Can someone please help me by doing that?
Just to make sure what I'm talking about I attach my code here:
<?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/test">
<process id="KreditvergabeprozessV3" name="KreditvergabeprozessV3" isExecutable="true">
<startEvent id="startevent1" name="Antrag auf Webseite einreichen" activiti:initiator="customerName">
<extensionElements>
<activiti:formProperty xmlns:activiti="http://activiti.org/bpmn" id="firstnameOfCustomer" name="Vorname" type="string" required="true"></activiti:formProperty>
<activiti:formProperty xmlns:activiti="http://activiti.org/bpmn" id="surnameOfCustomer" name="Name" type="string" required="true"></activiti:formProperty>
<activiti:formProperty xmlns:activiti="http://activiti.org/bpmn" id="creditAmount" name="Gewuenschter Kreditbetrag" type="long" required="true"></activiti:formProperty>
<activiti:formProperty xmlns:activiti="http://activiti.org/bpmn" id="creditPayBackTime" name="Gewuenschte Laufzeit in Monaten" type="long" ></activiti:formProperty>
<activiti:formProperty xmlns:activiti="http://activiti.org/bpmn" id="occupation" name="Beruf" type="string" required="true"></activiti:formProperty>
</extensionElements>
</startEvent>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
<userTask id="usertask1" name="Antrag grob pruefen">
<documentation>${customerName} benoetigt einen Kredit in Hoehe von ${creditAmount} mit einer Laufzeit von ${creditPayBackTime} Monaten. ${firstnameOfCustomer} ${surnameofCustomer} ist von Beruf ${occupation} .</documentation>
<extensionElements>
<activiti:formProperty id="meetingCustomer" name="Moechten Sie den Kunden zu einem persoenlichen Gespraech einladen?" type=enum required="true">
<activiti:value id="true" name="Kunde einladen"/>
<activiti:value id="false" name="Ohne Einladung pruefen"/>
</activiti:formProperty>
</extensionElements>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>sales</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow2" sourceRef="usertask1" targetRef="exclusivegateway1"></sequenceFlow>
<exclusiveGateway id="exclusivegateway1" name="Kunde_einladen?"></exclusiveGateway>
<sequenceFlow id="flow3" sourceRef="exclusivegateway1" targetRef="usertask2">
<conditionExpression xsi:type="tFormalExpression"> ${meetingCustomer=='true'}</conditionExpression>
</sequenceFlow>
<userTask id="usertask2" name="Einladung lesen">
<documentation>Das Sales-Team der ActivitiBank moechte Sie zu einem persoenlichen Gespraech einladen.</documentation>
<extensionElements>
<activiti:formProperty id="invitationCustomer" name="Moechten Sie den Kunden zu einem persoenlichen Gespraech einladen?" type=enum required="true">
<activiti:value id="true" name="Ich moechte ein persoenliches Gespraech"/>
<activiti:value id="false" name="Ich habe kein Interesse"/>
</activiti:formProperty>
</extensionElements>
<humanPerformer>
<resourceAssignmentExpression>
<formalExpression>${customerName}</formalExpression>
</resourceAssignmentExpression>
</humanPerformer>
</userTask>
<sequenceFlow id="flow4" sourceRef="usertask2" targetRef="exclusivegateway2"></sequenceFlow>
<exclusiveGateway id="exclusivegateway2" name="Einladung_annehmen?"></exclusiveGateway>
<sequenceFlow id="flow5" sourceRef="exclusivegateway2" targetRef="endevent1">
<conditionExpression xsi:type="tFormalExpression">${invitationCustomer=='false'}</conditionExpression>
</sequenceFlow>
<endEvent id="endevent1" name="Kein Interesse"></endEvent>
<sequenceFlow id="flow6" sourceRef="exclusivegateway2" targetRef="usertask3">
<conditionExpression xsi:type="tFormalExpression">${invitationCustomer=='true'}</conditionExpression>
</sequenceFlow>
<userTask id="usertask3" name="Interview fuehren">
<documentation>Bitte ergaenzen Sie die folgenden Kundendaten im Interview.</documentation>
<extentionsElement>
<activiti:formProperty id="creditReason" name="Grund fuer den Antrag eines Kredits:" type="String"></activiti:formProperty>
<activiti:formProperty id="customerLook" name="Erscheinungsbild:" type="String"></activiti:formProperty>
<activiti:formPrpoerty id="yearlySalary" name="Netto-Jahresgehalt" type="long"></activiti:formPrpoerty>
</extentionsElement>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>sales</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow7" sourceRef="exclusivegateway1" targetRef="exclusivegateway3"></sequenceFlow>
<sequenceFlow id="flow8" sourceRef="usertask3" targetRef="exclusivegateway3"></sequenceFlow>
<exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>
<sequenceFlow id="flow9" sourceRef="exclusivegateway3" targetRef="usertask4"></sequenceFlow>
<userTask id="usertask4" name="Antrag detailliert pruefen">
<documentation>
Vorname: ${firstnameOfCustomer}
Nachname: ${surnameOfCustomer}
Beruf: ${occupation}
Gewuenschter Betrag:${creditAmount}
Rueckzahlung in Monate: ${creditPayBackTime}
Grund fuer den Antrag eines Kredits: ${creditReason}
Erscheinungsbild: ${customerLook}
Netto-Jahresgehalt: ${yearlySalary
</documentation>
<activiti:formProperty id="salesInspection" name="Moechten Sie den Kredit endgueltig genehmigen?" type=enum required="true">
<activiti:value id="true" name="JA"/>
<activiti:value id="false" name="NEIN"/>
</activiti:formProperty>
</userTask>
<sequenceFlow id="flow10" sourceRef="usertask4" targetRef="exclusivegateway4"></sequenceFlow>
<exclusiveGateway id="exclusivegateway4" name="Antrag_ok?"></exclusiveGateway>
<sequenceFlow id="flow11" sourceRef="exclusivegateway4" targetRef="usertask5">
<conditionExpression xsi:type="tFormalExpression">${salesInspection=='true'}</conditionExpression>
</sequenceFlow>
<userTask id="usertask5" name="Antrag unterschreiben">
<documentation>Sales hat den Kreditantrag genehmigt. Ihre Unterschrift fehlt noch.</documentation>
<extentionsElement>
<acitivi:formProperty id="signature" name="Signatur:" type="String"></acitivi:formProperty>
</extentionsElement>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>management</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow12" sourceRef="exclusivegateway4" targetRef="endevent2">
<conditionExpression xsi:type="tFormalExpression">${salesInspection=='false'}</conditionExpression>
</sequenceFlow>
<endEvent id="endevent2" name="Antrag abgelehnt"></endEvent>
<sequenceFlow id="flow13" sourceRef="usertask5" targetRef="parallelgateway1"></sequenceFlow>
<parallelGateway id="parallelgateway1" name="Stakeholder informieren"></parallelGateway>
<sequenceFlow id="flow14" sourceRef="parallelgateway1" targetRef="endevent3"></sequenceFlow>
<endEvent id="endevent3" name="Informiert"></endEvent>
<sequenceFlow id="flow15" sourceRef="parallelgateway1" targetRef="endevent4"></sequenceFlow>
<endEvent id="endevent4" name="Genehmigung erhalten"></endEvent>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_KreditvergabeprozessV3">
<bpmndi:BPMNPlane bpmnElement="KreditvergabeprozessV3" id="BPMNPlane_KreditvergabeprozessV3">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="50.0" y="358.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="71.0" width="105.0" x="130.0" y="340.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
<omgdc:Bounds height="40.0" width="40.0" x="280.0" y="356.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
<omgdc:Bounds height="55.0" width="105.0" x="370.0" y="250.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
<omgdc:Bounds height="40.0" width="40.0" x="520.0" y="258.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="740.0" y="260.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
<omgdc:Bounds height="55.0" width="105.0" x="488.0" y="310.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="exclusivegateway3" id="BPMNShape_exclusivegateway3">
<omgdc:Bounds height="40.0" width="40.0" x="610.0" y="355.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">
<omgdc:Bounds height="74.0" width="105.0" x="750.0" y="337.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="exclusivegateway4" id="BPMNShape_exclusivegateway4">
<omgdc:Bounds height="40.0" width="40.0" x="900.0" y="355.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">
<omgdc:Bounds height="61.0" width="105.0" x="868.0" y="440.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
<omgdc:Bounds height="35.0" width="35.0" x="903.0" y="260.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="parallelgateway1" id="BPMNShape_parallelgateway1">
<omgdc:Bounds height="40.0" width="40.0" x="1010.0" y="450.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">
<omgdc:Bounds height="35.0" width="35.0" x="1013.0" y="359.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">
<omgdc:Bounds height="35.0" width="35.0" x="1090.0" y="260.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="85.0" y="375.0"></omgdi:waypoint>
<omgdi:waypoint x="130.0" y="375.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="235.0" y="375.0"></omgdi:waypoint>
<omgdi:waypoint x="280.0" y="376.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="300.0" y="356.0"></omgdi:waypoint>
<omgdi:waypoint x="300.0" y="277.0"></omgdi:waypoint>
<omgdi:waypoint x="370.0" y="277.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="475.0" y="277.0"></omgdi:waypoint>
<omgdi:waypoint x="520.0" y="278.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="560.0" y="278.0"></omgdi:waypoint>
<omgdi:waypoint x="740.0" y="277.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="540.0" y="298.0"></omgdi:waypoint>
<omgdi:waypoint x="540.0" y="310.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
<omgdi:waypoint x="320.0" y="376.0"></omgdi:waypoint>
<omgdi:waypoint x="610.0" y="375.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
<omgdi:waypoint x="593.0" y="337.0"></omgdi:waypoint>
<omgdi:waypoint x="630.0" y="337.0"></omgdi:waypoint>
<omgdi:waypoint x="630.0" y="355.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
<omgdi:waypoint x="650.0" y="375.0"></omgdi:waypoint>
<omgdi:waypoint x="750.0" y="374.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
<omgdi:waypoint x="855.0" y="374.0"></omgdi:waypoint>
<omgdi:waypoint x="900.0" y="375.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
<omgdi:waypoint x="920.0" y="395.0"></omgdi:waypoint>
<omgdi:waypoint x="920.0" y="440.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
<omgdi:waypoint x="920.0" y="355.0"></omgdi:waypoint>
<omgdi:waypoint x="920.0" y="295.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
<omgdi:waypoint x="973.0" y="470.0"></omgdi:waypoint>
<omgdi:waypoint x="1010.0" y="470.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
<omgdi:waypoint x="1030.0" y="450.0"></omgdi:waypoint>
<omgdi:waypoint x="1030.0" y="394.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
<omgdi:waypoint x="1050.0" y="470.0"></omgdi:waypoint>
<omgdi:waypoint x="1107.0" y="470.0"></omgdi:waypoint>
<omgdi:waypoint x="1107.0" y="295.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
In Activiti Explorer go to Manage > Deployments and choose 'Upload New'. That will allow you to choose a file to upload.
That is how it works in version 5.22, it may be slightly different for other versions but the principle will be the same.
You can also deploy programatically via the API.
But it only takes a bpmn20.xml file and I don't know how to do this.
I have a normal xml file.
I think you just need to make sure your file name ends .bpmn20.xml, and then assuming it contains a valid activiti BPMN 2.0 definition it should load.
You mean I should manually rename the end of the file name?
When I have created the files manually I just make sure the name ends.bpmn20.xml, so yes just try renaming your file and test it. If it is valid it should load.
Dear PaulT,
thanks for your help. Btw, can you send me an example of a self-written workflow code you were able to upload into the activiti workflow management system? Maybe I will discover some mistakes I did in my code.
I initially created my processes by modifying the demo processes that ship with Activiti simply using a text editor, so they would be a better thing to look at for examples.
They can be found in the .WAR file, or in the deployed tomcat server. Path WEB_INF\classes\org\activiti\explorer\demo\process
Hope this helps
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.