cancel
Showing results for 
Search instead for 
Did you mean: 

ServiceTask discrepancy in Designer & Modeler

m2spring
Champ in-the-making
Champ in-the-making
Designer generates my ServiceTask as

    <serviceTask id="jtID" name="jenkins task" activiti:extensionId="com.cisco.step.jenkins.plugins.jenkow.designer.JenkinsTask">
      <extensionElements>
        <activiti:field name="jobName">
          <activiti:string>launchee</activiti:string>
        </activiti:field>
        <activiti:field name="isManualJobLaunchMode">
          <activiti:string>false</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
Modeler generates it as

    <serviceTask id="jtID" name="jenkins task" activiti:exclusive="false" activiti:class="com.cisco.step.jenkins.plugins.jenkow.JenkinsTaskDelegate">
      <documentation>docs</documentation>
      <extensionElements>
        <activiti:field name="jobName" stringValue="launchee"></activiti:field>
        <activiti:field name="isManualJobLaunchMode" stringValue="true"></activiti:field>
      </extensionElements>
    </serviceTask>

Note the difference how the values of the extension fields are encoded.
Designer does child elements, Modeler does attributes.
Is this a problem?

The additional 'exclusive' attribute on the serviceTask element on the Modeler side I haven't chased down yet.
Might have something to do how I extended Modeler.

-Max
4 REPLIES 4

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Is this a problem?

Have you tried to see if it makes a difference?

tiesebarrell
Champ in-the-making
Champ in-the-making
I don't think this makes a difference. Actually, the userguide states (here: http://activiti.org/userguide/index.html#serviceTaskFieldInjection😞

"Alternatively, for longs texts (e.g. an inline e-mail) the 'activiti:string' sub element can be used…"

For what it's worth, please note that the classes generated in the XML refer to two entirely different things. The activiti:extensionId attribute is the id of the extension to the default service task you are using. This is the fully qualified name of the class for the extension. The activiti:class attribute refers to the Delegate class that is instantiated and invoked when the process reaches the service task in the runtime.

m2spring
Champ in-the-making
Champ in-the-making
Thanks for the pointer to the userguide.  This clarifies a lot.

I'll be looking more into the discrepancy of the activiti:extensionId vs. activiti:class.
Interestingly, the Designer-generated XML does work as intended.

I'm currently working in adding the same extension (a "Jenkins Task" type) into Modeler.
I feel I'm pretty close.

Unfortunately, Modeler doesn't seem to have a generic extension mechanism.
So, I'm basically adding what I need into the source code.
I'll probably ship my own Modeler with my Jenkins plugin.
Maybe once I understand all what's needed I will think about adding an extension mechanism which I then would contribute back to Modeler.

-Max

trademak
Star Contributor
Star Contributor
Hi Max,

When we release a new version of the Activiti Modeler the generated XML will be exactly the same as the Activiti Designer 5.11.2 version.
They use the same library (activiti-bpmn-converter) to generate the XML now.
There's the wish to also add a similar plugin mechanism for the Activiti Modeler, but if we are able to add it to the 5.12 release I'm not sure.

Best regards,