AnsweredAssumed Answered

Custom activity with custom attribute for service task

Question asked by shishirg on Aug 30, 2013
Latest reply on Sep 4, 2013 by jbarrez
Hi,

I want to create a service task which has a custom attribute like activiti:customTask which is similar to activiti:class but implementing my custom interface instead of JavaDelegate. I went through parsing and behavior part of the code and think below would be the steps.
1. Define a custom parseHandler which extends from ServiceTaskParseHandler(since its a service task) and checks for the custom attribute.
2. Define a custom behavior factory which overrides the createTaskActivityBehavior() to create a custom behavior object implementing TaskActivityBehavior which takes the user class object (UserClass which implements MyInterface instead of JavaDelegate).
3. Define a custom task invocation extending DelegateInvocation to handle the custom task class invocation.
4. Define a xml converter(extending ServiceTaskXMLConverter) to add the implementation type to ServiceTask object provided through activiti:customTask attribute.

Now I am able to find properties in ProcessEngineConfigurations for parseHandler and activityBehaviorFactory to take my custom classes, but could not find how to set the XMLConverter in the ProcessEngineConfigurations.

Please help me understand how to add my custom xml converter.


Thanks
Shishir

Outcomes