Launch processes on demand without using the LaunchProcess action


We are migrating the Organization's work flows to the OS BPT for some time now. To meet the organization needs we extended the BPT meta model.
To get some context of the system, we've got document work flows, each document type has its own process. Almost 100% of the documents are from external systems, so we need to launch the process when the document is submitted.
As new processes are created, our process launch action is getting bigger, you can take a look to the attached screen shot.

My question is, can we launch processes instances on demand without using the LaunchProcess<ProcessName> action?

The goal is to have an action where is given a DocumentId, a ProcessDefinitionId (or ProcessDefinitionName) as input parameters. Then within the action, we create a new record in the entities:

Process_Def_Id = ProcessDefinitionId (my input parameter)
Parent_Process_Id = null
Parent_Activity_Id = null
Top_Process_Id = Id (current created instance)
Status_Id = 1 (active)

Leave the Suspended_Date and Suspended_By attributes null

Copy fields from Process_Imput_Definition
Process_Id = current created Process instance Id
Input_Value = DocumentId (my input parameter)
Activity_Id = null

1. If I create the above two records, the BPT engine will fire up the process instance, right?
2. Where do I get the Process.Label value (the Detail process property)?

One possible problem is maintainability, as this entities may change in future platform versions

Is there another way to implement this?

Thanks in advance,
Hi José,

Just creating lines at those tables won't be enough to trigger the process.
Also I don't recommend you to try and change those entities manually.

The only 3 ways to trigger a process launch are: Launch action, Execute Process Activity or with the "Launch On" property (where a process is created when a new record is created in an entity).

João Rosado
Hi João,

Thanks for you reply, and sorry for replying so late...
Ok, so my action will grow in the future :(
What do you meen by 'Execute Process Activity'? I think I missed this one...


It's the name of the activity used to create a Sub Process in the BPT flow:

João Rosado

Yes, indeed... Sorry about that...