cancel
Showing results for 
Search instead for 
Did you mean: 

How to create custom service task in Activiti 6.0

as0077749
Champ in-the-making
Champ in-the-making
We have a requirement where we need to create a custom service task based on business need with certain properties.

Can someone suggest how to do this in Activiti 6 beta.

We are exploring this on Activiti 6 beta to propose as a web based modeller.

Thanks,
Ashish S.
4 REPLIES 4

vasile_dirla
Star Contributor
Star Contributor
do you want to modify the code in order to add a new element in the set of tasks in the process editor or you just want to use a Service task with a java delegate class ?

booth ways should end with this type of service task definitions generated in the process definition.

<code>
<serviceTask id="javaService"
    name="Java service invocation"
    activiti:class="org.activiti.examples.bpmn.servicetask.ToUpperCaseFieldInjected">
    <extensionElements>
      <activiti:field name="text" stringValue="Hello World" />
  </extensionElements>
</serviceTask>
</code>

piyush_wadhwani
Champ in-the-making
Champ in-the-making
Vasile,

How can we add  Custom extensions to the process designer?
i am able to see custom extension in eclipse designer but how can i add it to web based process designer so that users can use them?
im using activiti 6 beta 2.

jbarrez
Star Contributor
Star Contributor
The pallette of the modeler is driven by this file: https://github.com/Activiti/Activiti/blob/activiti6/modules/activiti-ui/activiti-app-logic/src/main/...

However, we haven't documented how to change this (plus all the dependent files). Our current focus is the v6 engine, it'll take a while until we get to the point where we'll document these things.

as0077749
Champ in-the-making
Champ in-the-making
Yes, That is correct by using stencilset_bpmn.json have created custom component in Activiti  palette and now that custom component is working fine for me.

Vasile,

Thanks for suggestion, actually we want a custom component which will do certain predefined task, so user need to just drag and  drop the component from palette at design time and our code will support custom component at runtime, it's very useful for business user.