AnsweredAssumed Answered

Activiti | Create a generic Service task to send XML Over HTTP

Question asked by manchandap on Apr 14, 2014
Latest reply on Apr 22, 2014 by jbarrez
As continued part of our Activiti Evaluation we are doing a PoC to migrate our existing templates to BPMN Specs. For that we need to migrate existing tasks and one of the most critical is a task that would communicate with mother application using XML over HTTP. I am planning to create a service task (Java Delegate) for this purpose. This task has to be reusable so that I can use it in different process definitions and also in the same definition for different invocation within the same definition.
To achieve this, the service task needs to be provided with initialization parameters as well as the XML body. The initialization parameters include:
URL of the mother application
Authentication Credentials
My Query and confusion is how to best implement this requirement.

For example, I can keep the initialization parameters in a properties file and create a sub process with its own service task to read this file. This sub process would then be part of the main process. Alternatively, I can read this properties file in the service task, instead of creating a sub process

What is the best practice/guideline for this type of scenario.

The XML body (means the content of XML) would vary as per the process definitions and would need to be parametrized. What is best way to provide XML to the service task, given the fact that this is reusable task. For example, shall I define the XML as part of the .bpmn.xml file or should I create a separate template files with an identifier and use them in my service task(the one which would send xml over http) Thanks