Skip to main content

Posts

Showing posts from April, 2016

Provide a error/success message to the client while executing BPMN flow

Let's say we have a web application with a form, when we fill the form and click on submit button, it executes the BPMN workflow, then we want to give a success or error message to the user whether that particular action was succeeded or not. BPMN process: 1. Start event (Give required information) 2. Allocate Consultant (Save data in database) 3. Send email (Send email to relevant parties) 4. Change status (get human interaction to continue the process) 5. another task.... How this executes; When we start this process, it creates process instance, execute allocate consultant, send email and return response with process instance details, when it hits the user task. But that response does not contain any information about whether those executed tasks succeeded or not. Solution: Let's say when it executes allocate consultant task, it invokes database create operation; if it was failed, we want to give error message, else need to give success message. So, we

Invoking REST API using BPMN

You can use BPMN Service Task and configure it as following to invoke a REST API Example with text input and text output: Example with JSON input and JSON output mapping and registry based URL: You can find implementation of org.wso2.carbon.bpmn.extensions.rest.RESTTask class here https://github.com/wso2/carbon-business-process/blob/master/components/bpmn/org.wso2.carbon.bpmn/src/main/java/org/wso2/carbon/bpmn/extensions/rest/RESTTask.java Currently it supports GET and POST only. If you need support for other HTTP methods you have to implement custom java service task similar to REST Task implementation that supports rest of REST API functionalities.

How to see the execution flow of BPMN in WSO2 BPS

The latest version of WSO2 BPS 3.5.1, does not provide a mechanism to see the execution flow of BPS process. you can understand the flow enabling debug logs of acitivi engine. Go to <BPS_HOME>/repository/conf/log4j.properties and add the following But it provides the current state of execution flow with the instance view of WSO2 BPS login to WSO2 BPS Go to Main->Manage -> Instances ->BPMN WSO2 BPS http://wso2.com/products/business-process-server/ WSO2 BPS documentation https://docs.wso2.com/display/BPS351/WSO2+Business+Process+Server+Documentation