Chaining User Tasks to create an interactive flow (sort of a wizard style)?

Been looking at chaining user tasks together. use case is that there are certain scenarios where you may want successive questions asked to the same user and have them fill our information or make decisions.

Typical Workflow / Wizard type of work. Question was raised if BPMN/Camunda could be used for this purpose. If each User task was chained together and when a user on the form selected “Next” or whichever action button, the form would submit and the next form load.
As a simple POC, would assume that every task is a user task and it is a continual flow without any service tasks or other kind of activity breaking the chain. At the end of each submit, the UI would check to see if there is another task and load the subsequent task until reaching End/Termination.

Quick example i through together:

Any thoughts on this use case? Anyone done this before? I see lots of reasons not to do this, but also see a lot of benefits as well.

1 Like

Hi,
You may be interested in this presenttion [1]. This discusses pageflow versus process flow and how a UI mediator pattern could realise pageflow using BPMN user tasks…

regards

Rob

[1] http://www.bpm-guide.de/2012/04/04/pageflow-vs-process-flow-and-ui-mediator-pattern/

PERFECT! That is actually what i was looking for. We have been using the term Form flow rather than Page flow. But Page makes more sense in this context.

So my followup question is do you know if further work was ever done on this model in relation to Camunda?

The mediator layer seems like a great API to exist or any sample applications that are more recent?

Anyone done this in practice?

Hi,
Ive contemplated using something similar using an Angular single page app. Hence submit a form using the REST API. As long as the user tasks are not asynchronous, your client thread will ‘block’ until a wait state or end of process. Hence when your call returns, query the process using the REST API. If at a user task, use the get form API to retrieve the form and blend it into your angular app. In this architecture, your Angular single page app thus becomes the UI mediator.

As mentioned, Ive contemplated this, not done it in anger yet…

Im more inclined to realise page flow in an angular single page app rather than model it as BPMN user tasks…

regards

Rob

We have been working on a External User Task Form builder that would acceptable variables and send variables back from camunda. Page flow is something we have been looking at adding. We were thinking that in addition to the Process, there would be the PageFlow Process which would be activated when starting the External User Task (or Start Event).

Our biggest issue so far is that since Tasks cannot be reopened, there would be no “Back” option in the page flow. Once you go forward, you would not be able to go back…
Possibly support a scenario such as:

Which would support the scenario that Q4 does not allow you to go “Back” once you have started Q4.

But all of this “smells” like it is trying to repurpose BPMN for page flow, when the engine was not really designed for such types of interactions.

Still thinking about it though.

Here is a simple example of a scenario where you would not want to allow “going back”

Once a search is completed and the record is viewed, the user would not be able to run another search. They would be charged, and shown their receipt.

Any thoughts from Camunda Staff?

Hi Stephen,

Any further insight on best way to realise pageflow coupled to process flow?

regards

Rob

@Webcyberrob, the more we looked at using BPMN as page flow option/as a page flow manager (controlling which pages appear to the user and when), the more it ‘smelt’ and felt like a bad idea. So many exceptions and “weirdness” to handle.

Examples of foreseen issues:

And so we have been looking at merging LogicPull’s vision of visual Step chaining logicpull.com/tour https://github.com/logicpull/logicpull and Form.io’s ngFormBuilder https://github.com/formio/ngFormBuilder.

The form builder already has the code for “wizards”, and you can conditionally load the steps, but all steps are currently loaded at initial form load time. So some work would be required there.

Overall the thinking was something along the lines of allowing ngFormBuilder + the formio Node server https://github.com/formio/formio manage the “experience”. So if you needed chaining it would be a wizard in a single start event or task.

If we wanted to call actual camunda tasks, we could use something like: BPMN 2.0 Symbols - A complete guide with examples. - Camunda where the process starts whens the form starts, and allow the Wizard in formio / node server to decide when to call the various ad-hoc bpmn processes. We could use something like JS promises to provide a level of asynchronous behaviour (but still being investigated).

We have a slightly different implementation using Symfony/php at the moment, but I am heavily leaning towards the above style of usage.

note: bpmn diagrams are not mean to be bpmn compliant. They are designed to demonstrate the style/type of modelling that could be required to adequately show page flow in a meaningful way to an analyst/developer/business user.

Stephen,

Were there any more ideas on this page flow concepts?

We are implementing Camunda using Form.io with a page flow with the expectation of doing alot more with Camunda for logical decisions that a straight page flow tool may not allow.

Paul

@Paul_McCauley the outcome of this testing is if you are trying to do wizard level pageflow, doing this with Camunda/BPMN is not the way to do it for all the above reasons and just that it BPMN is not designed for this.

with the microservices on github.com/digitalstate we built integrations with formio and camunda, and for wizard level we took: https://github.com/craue/CraueFormFlowBundle and built a API around it that has a formio form load for each step in the FormFlow.

See the features of the FormFlowBundle and you will quickly understand why bpmn is not a fit for the type of features that are involved in a wizard.

Another example: https://github.com/UKHomeOffice/passports-form-wizard

1 Like

@Paul_McCauley would be very interested to see your breakdown of features that you determined that BPMN can cover for page flow vs non-bpmn.

@StephenOTT Thank you for the additional information.

I am still looking at the https://github.com/craue/CraueFormFlowBundle tool mentioned and I am very interested to understand what digitalstate is all about. This platform looks very interesting. Do you know if the entire platform is open source?

To your comment about working with BPMN to make the wizard/pageflow work:
Our solution:
A. Needs to deliver customize-able business flows by non development staff ( drag and drop )
B. Tasks make calls to external and internal services
C. Must have logic that can be implemented by non-development staff
D. Support data extensions by non development staff to collect client specific requests
E. Must have the ability to change the forms to collect input ( point D and thus our integration with Form.io )
F. Allow tasks to be simple user data collection or complex custom “node” to perform complex external integration with services like background checks
G. Tasks need to be performed by individual users or groups
H. We also have parallel and serial tasks/processes that occur
I. We expect the need to use DMN and CMMN for less structured processes
J. We build contracts in PDF form with electronic signatures that need to support custom development to merge, display, sign, engage approvals

Those are some highlights.

And even though that list seems to support using a tool like Camunda, we still have a need to let a user “Go Back” to change some data entered that may affect re-running external services, merged data, document rejections and ultimately the need to regenerate and repeat document signing.

I look forward to your thoughts.

And do you know more about the digitalstate platform you mentioned above?

Paul

@Paul_McCauley we designed DigitalState for government service delivery (high level of security, field level acl, JWT, encryption, Multi-lingual UI and Content, Accessible UI, manage complex business processes and logic, Mobile friendly, API first, etc). But there are actually no “government” references in the platform. It can be used for lots of different use cases.

look at www.github.com/digitalstate.

Our plans have to add the following type of ability in FormFlow as a UI:
https://webcache.googleusercontent.com/search?q=cache:nyN4UWpQtMsJ:https://logicpull.com/tour+&cd=1&hl=en&ct=clnk&gl=ca

Where you can build a Form Flow visually, and each step is a formio form. This is done so you can have sever side validations of each step, and not expose the next form to the client until they are validated for that step.

We made architecture decisions about what are Form aspects and what are API calls (ajax calls, per-step server side, and on final submission/post-submission).

If you consider building BPMN with some writing of Javascript in the script aspects of the BPMN as “non-development staff”, then you have lots of out of the box power. If non-development staff requires “UI-for-everything”, then UI building will be required to convert the APIs and JS patterns into common UIs. But we have found that this is typically not worth it.

Questions:

Can you explain Points B, C, D.

Note:
Note that BPMN still requires some level of development knowledge. Some basic scripting (Example we typically use javascript) and data handling knowledge is important for managing and manipulating data in the BPMN, DMN, and CMMN.

edit: for the Open Source Question: Yes the core/majority of the platform is open source. There are a few items we do not release as they are typically high level of configuration and only needed for paying customers. Each of the components of the platform are designed around “Business Functions” in a Microservices approach, and mapped together with the Admin and Portal UIs (Angular)

@StephenOTT
DigitalState sounds very interesting.

Regarding the JavaScript in BPMN, I agree with you about the level of “non development” skill. JUEL will also be used for simpler decisions in the business flow as the team building the flows decides.

Regarding B, C, and D:

B. Tasks make calls to external and internal services
Our solution validates user input from postal information to personal ID verification and we have built these into sub-flows in combination of data collection from Form.io pages, custom Java delegation code that calls developed micro services that talk to our partner services.

C. Must have logic that can be implemented by non-development staff
This point is focused on the ability for different levels of our teams to create conditions in business flows to decision on data collected. As an example, we have tasks that allow documents to be presented based upon configurations that allow a business flow to get very granular about what documents to present under “programmed” conditions. That is one example.

D. Support data extensions by non development staff to collect client specific requests
The customers the system supports have new and different data needs depending on documents that must be created and signed or external partnerships or their business rules. Most custom implementation needs custom data collection. The system we are building allows the professional services team to add fields and map those fields to Form.io page fields and those forms are used in the business flows which then allow documents to be mapped with the fields and populated for document generation. The data collected is also available for updates presented in a Form.io in a customizable SPA interface.

Paul

@Paul_McCauley so the way we look at things is:

B: These would be built a stand-along BPMN processes (or some other microservice), and the Form, BPMN, or another system calls these services as required.

C: In our view, unless you create very detailed UIs, or have very simple use cases that do no drastically change, then you will still require some level of scripting.

D: We store most data as a JSON object in Camunda. So Formio submits a JSON data payload, which is passed into Camunda, and camunda moves the data around to the various systems as needed. When data is presented as a Report, Another Formio Form in Read-Only, or some other Angular for, it is JSON output managed by camunda or another service that manipulates the data into the proper location. The point is that only the data manipulation layer needs to be edited. The input and Output is all done the same across all our scenarios. It is just the “in-between” the input and output that changes based on the business and system needs.

Dear All,
Any one has done wizard style,if so could you please let me know how we can achieve
thanks,
Bala .

@gmbala have you read the above?

If yes, can you explain your use case?

Hi Stepen,

I read the topics ,however I need the such a implementation in my project .

we have around 1oo Deck which should be displayed one after another based on the user’s selection .User cant go

back in any situation .
Answere/Question
thanks,
Bala