Process Start And Task Start Data Model Requirements/Restrictions ("Required" Process Variables)

Anyone have any patterns for handling/creating data model structures that are required to start a process or start a task(user tasks). From a API perspective you could start a Start event / user task /complete a user task without the form UI. The form acts as a sort of Data Model control of what data is transformed into the process variables. So if you drop the actual form UI, you lose that control.

So you could technically start a process through the API with user Input and you could start a process through the API without the UI Form.
Anyone come up with any sort of configurable option where you could Server Validate the Process variables that are Inputed when the process is started, and if the proper structure is not submitted, then the process will not start (or if it is a task, the task will not start)?

From a currently built in perspective I was thinking a YML/JSON file that defines the Data structure you are looking for when process starts and have a delegate run in the Execution Listener for Event Type: start. But have not tested and not clear if this would work.

I think the task scenario is more complicated than Start Events as task would have to deal with the different scopes + the existing and new variables. So if it simplifies the conversation, lets just look at Start Events.

Anyone have any thoughts?

Hi,
With regard to start form patterns, particularly public facing forms, I tend to have a separate forms management system. Thus I treat it as a trusted client of the process engine. The forms server enforces validation rules and only ever submits a complete payload to the process engine to start a process instance…

Agreed. We are using form.io oss for this. (Will be sharing implantation with community shortly).

Any specific framework you are using?

@camunda have you done any work in the past with variable requirements to start a process? Possibly if someone was using a process as part of a API call and you want to enforce required fields?

@camunda do you have any insights on opinions on having “required” input variables for a process? (aka: Start Process must have XYZ variables provided)

I suggest you register a start listener on the process and validate the presence of those variables there.

Cheers,
Thorben

Thanks @thorben. sort of similar to: Limit number of concurrently running instances of a process definition