Is there any way to programmatically action a process instance from within a client event based on some defined condition (like if data field = value)
Can I add some code in the “Event Item” on the DataEntry Client Event to automatically action the instance based on some condition?
We have a windows client application communicating with the K2 client and management API. The beginning of our process starts with a DataEntry user. The problem is we need to synchronously start the K2 process to get the available actions for the user. Using the management API I thought we might be able to query the client event actions and show the user. When the user selects an action the K2 process is started asynchronously and a data field is set to the selected action. Code in the Client Event will automatically action appropriately based on the data field value.
If this is not possible is there any way I can remove the client event and just add default lines (add line rule) and utilise the Management API to programmatically determine the possible paths? Normally I could utilise ManagementAPI.GetEventActions(activityEvent.ID) to get the available actions for the client event. How can I get the actions linked to an activity via the management API? I would prefer to automate the client event if possible.