Interactive BPMN Process

I want to create a BPMN Process that will be invoked from my custom UI application (possibly thru a REST API). I will pass a certain input while starting the process-instance for the first time. Based on this input the flow has to trigger a service which will build a FORM and this FORM has to be returned back and rendered in my custom UI application. Once the user provides his input in this FORM and submits then it has to come back to my flow and trigger another service based on the inputs user provided in the FORM.

Sequence Flow:
(Start) UI -> BPMN (requestCreation) -> Service1-> BPMN (processResponse) -> UI -> BPMN (requestCreation) -> Service2 -> BPMN (processResponse) -> UI (End)

Does camunda has the capability to serve such a use case. If so is there a sample/example i can refer to. I am a beginner in Camunda world so please help me with right pointers. TIA.

@oops_work take a look at this: http://www.bpm-guide.de/2012/04/04/pageflow-vs-process-flow-and-ui-mediator-pattern/

Sounds like you are looking for Pageflow.

There are lots of “catch 22s” that exist (imo) when trying to preform page flow (skipping steps, going back a step, optional steps, etc).

Can you provide more detail about your use case? It seems like you may be better served with Multi-Step Form and Server Side Routing of the steps (after each step you call your server side functions).

You should look at BP3’s Brazos UI environment. It supports page flow in a single “User Task”.
Full disclosure, I work for BP3.

Greg

Do you happen to have any example projects that where Brazos UI and Camunda are integrated? I’d be interested in checking it out.

Hey Niall,
No customers I can currently share due to contract privacy terms, but we have two projects going right now that we should be allowed to share when they complete.
Sorry,
Greg

1 Like

Super - well give me a shout when they’re done, I’m always interested in camunda UI integration.

Thanks for the response Stephen. I have a restriction in my requirement that doesn’t allow me to make use of the CMMN capabilities(pageflow) of Camunda. All I need to do is interface with an existing UI application possibly created thru Angular JS. I will go through the article shared by you… Meanwhile I have another question. Is there a way to override the default response that camunda sends back for the REST API when we try to invoke a process instance. Like instead of sending the below response I just want send the processInstance URL and a custom message that says success or failure.
Current Response:

{
"links": [
  {
"method": "GET",
"href": "http://localhost:8010/engine-rest/process-instance/108aa44c-0de6-11e7-ade2-5cc5d4a8c483",
"rel": "self"
}
],
"id": "108aa44c-0de6-11e7-ade2-5cc5d4a8c483",
"definitionId": "api-lookup:1:cdd25b3a-0de0-11e7-ade2-5cc5d4a8c483",
"businessKey": null,
"caseInstanceId": null,
"ended": false,
"suspended": false,
"tenantId": null
}

Expected Response:

{
“links”: [
{
“method”: “GET”,
“href”: “http://localhost:8010/engine-rest/process-instance/108aa44c-0de6-11e7-ade2-5cc5d4a8c483”,
“rel”: “self”
}
],
“Response”: [
{
“code”:“200”
“message”:“WeatherAPI call is Successful”
}
]
}

Hi @oops_work I am not sure i understand. Where was CMMN mentioned?

You need to build a server infront of camunda or use something such as this: Embed the API | docs.camunda.org where you can embed the API into another JAX-RS app/api