Web Service task in BPMN 2.0 [1] is used to synchronously/asynchronously invoke an external Web service. BPMN ServiceTask is mapped to WS-BPEL Invoke Activity.
XML definition of the ServiceTask is; *<serviceTask id="webService"* * name="Web service invocation"* * implementation="##WebService"* * operationRef="tns:printCountOperation">* ServiceTaskHandler is capable of invoking web service operations in following modes: - synchronous (sends request and waits for response before continuing) - asynchronous (sends request and uses callback to get response) By adding async attribute to the service task configuration, we can get the async behaviour. <serviceTask id="MyTaskAsync" name="Async Service" activiti:async="true" activiti:class="com.sample.AsyncService"/> When we define a Service Task with the async attribute set to true, the execution of the service task logic will be launched in a separate transaction and thread. The process state is persisted to the Activiti database and a job is created to handle the service task execution - one way (sends request and does not wait for any response) [1] ServiceTask: BPMN 2.0 spec page 188 http://www.omg.org/spec/BPMN/2.0/PDF/ -- Thilini Ishaka Senior Software Engineer Phone: +94 11 214 5345 WSO2 Inc. http://wso2.com blog: thiliniishaka.blogspot.com linkedin: http://lk.linkedin.com/in/thiliniishaka twitter: https://twitter.com/#!/ThiliniIsh
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev