AnsweredAssumed Answered

Unit tests with variable into workflow

Question asked by marcantoine on Nov 19, 2015
Latest reply on Nov 20, 2015 by martin.grofcik

I'm based on unit tests located here: (and the source code repository).

I'll try to add some unit tests on my extensions of Service Task wrote in Java.
To test all configurations I need to launch this simplest workflow (with the simple activity), and pass parameters on the launch of the instance.
In my JavaDelegation class, I don't have correct values after get expression content. I get ${type} instead of the input value I passed to start the workflow.
Is it a bug ? because it work fine on a deployed instance of Activiti.
Do you have an issue for that ?


<?xml version="1.0" encoding="UTF-8"?>
<process id="workflowTest">
    <startEvent id="startevent1" name="Start" activiti:formKey="startForm">
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow>
    <serviceTask id="servicetask1" name="Test Extension" activiti:class="com.arkena.ConnectorJavaDelegation" activiti:extensionId="com.arkena.ConnectorDownloadTask">
        <activiti:field name="type">
    <sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>