Ending child process (no code)


Hi there,

 

  We are facing a problem. We have a workflow(parent) that starts 1 to n child processes via IPC Event. When the parent Process meets the conditions to end it should end all child processes that have not ended allready. Is there a way to do this without using any EventCode? 

Thank you in advance.

 

Best regards,

Carlos.


4 replies

Userlevel 1
Badge +8

Hi Carlos

 

I don't believe this is possible without some code. There is no event to stop another workflow.

Hi,

 

How about using a stored procedure that sets Status field in K2].[Server].[ProcInst] to 4 (closed) . The stored procedure can be called via a SmartObject from a SmartForm rule, ¿right?

 

Thank you in advance.

 

Best regards,

Carlos.

.

Userlevel 1
Badge +8

Hi Carlos

 

Writing stored procedures against the K2 database and the direct manipulation of data in the K2 database is not supported, and I strongly recommend you don't do this.

 

A stored procedure is code of a sort in any case. I would recommend you look at creating a workflow in Visual Studio with a code event that stops or cancels workflows. This code event will only require a few lines of code.

Badge +4

You can do this without code and without using the untidy adding the parent process Id to the folio of the child.

 

Simply create a datafield (e.g. ParentProcessID) in your child process and populate that when it is spawned by the parent.

 

To retrieve the children, you can then use the SmartObjects under Workflow Reports - Workflow Solutions - [MyProcessName] - List Process Instances

 

In that method , you can set a filter on ParentProcessId passing in the parent process id and returning a list of children IPCs

Reply