cancel
Showing results for 
Search instead for 
Did you mean: 

Changes made in activiti bpmn files are not getting reflected

paulclinton
Confirmed Champ
Confirmed Champ

Hey,

I'm was working on creating a custom workflow. I did exactly as done in the tutorial by Jeff Potts. Yes it did work fine. 

But one issue I'm facing is that, Whenever I make changes in the custom workflow (i.e HelloWorld.bpmn) It is not getting reflected in the final outcome.

This is my HelloWorld.bpmn file in xml

<?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" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="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="helloWorld" name="helloWorld" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="usertask1" name="User Task" activiti:assignee="${initiator.properties.userName}"></userTask>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1">
<extensionElements>
<activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
<activiti:field name="script">
<activiti:string><![CDATA[logger.log("Hello, World!");]]></activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
</sequenceFlow>
<sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_helloWorld">
<bpmndi:BPMNPlane bpmnElement="helloWorld" id="BPMNPlane_helloWorld">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="40.0" y="120.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55.0" width="105.0" x="190.0" y="110.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="440.0" y="120.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="75.0" y="137.0"></omgdi:waypoint>
<omgdi:waypoint x="190.0" y="137.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="295.0" y="137.0"></omgdi:waypoint>
<omgdi:waypoint x="440.0" y="137.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

This works fine. I get Hello, World! printed in the logs. But when I change the log message, say for example

<activiti:string><![CDATA[logger.log("Hello !!  ");]]></activiti:string>

and do a save and execute ./run.sh

When I execute this workflow, I get the previous message in the logs i.e Hello, World! and not the new log message (ieHello !!). Why is this happening?

I'm having issues because of this, evertime I need some changes in my custom workflow, I have to create a new file and then deploy it. 

Would be thankful if anyone could clarify this.

 

1 ACCEPTED ANSWER

jpotts
World-Class Innovator
World-Class Innovator

Thanks for working through the tutorial! I hope it was helpful.

Are you re-deploying the workflow after every change? Unless you have auto-deploy turned on, which you can tell because you'll have a bunch of versions of your workflow definition in the workflow console, you must re-deploy.

Steps:

  1. Deploy your AMP

  2. Open the workflow console and do "deploy activiti alfresco/module/workflow-tutorial-platform-jar/workflow/helloWorld.bpmn". Note: I'm guessing on the path--it's a classpath and I don't recall off the top of my head if what I'm showing here is correct but this gets you pointed in the right direction.

  3. Test your workflow

  4. Need to make a change? Make your change, build, go back to step 1.

The tutorial sets "redeploy" to false in the Spring Bean. You can change that to true if you want, then you can skip step 2. But when your code stabilizes, change back to false, otherwise you'll get a TON of unnecessary versions of your workflow definitions over time.

View answer in original post

2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator

Thanks for working through the tutorial! I hope it was helpful.

Are you re-deploying the workflow after every change? Unless you have auto-deploy turned on, which you can tell because you'll have a bunch of versions of your workflow definition in the workflow console, you must re-deploy.

Steps:

  1. Deploy your AMP

  2. Open the workflow console and do "deploy activiti alfresco/module/workflow-tutorial-platform-jar/workflow/helloWorld.bpmn". Note: I'm guessing on the path--it's a classpath and I don't recall off the top of my head if what I'm showing here is correct but this gets you pointed in the right direction.

  3. Test your workflow

  4. Need to make a change? Make your change, build, go back to step 1.

The tutorial sets "redeploy" to false in the Spring Bean. You can change that to true if you want, then you can skip step 2. But when your code stabilizes, change back to false, otherwise you'll get a TON of unnecessary versions of your workflow definitions over time.

Hey Jeff,

Thanks again for the quick elaborate solution. It did work.