WorkflowManagmentServer.GoToActivity within a server code event

  • 16 April 2008
  • 3 replies
  • 2 views

Badge +1

Hey All,

I have a parent process which kicks off a number of a child ipc processes.  Each time it kicks one off it passes through the parent process id in field mappings.

 From within the child process I want to make the parent process go to a given activity based on execution in the child processes.  

I have been snooping around the developer reference and seen that this may be possible using the WorkflowManagementServer class and the GoToActivity code but have not been able to get it working within a child process code event.

Has anyone had any experience with this?

Thanks!

Arnie

 


3 replies

Badge +6

Hi there!


Two words of caution on doing this! Firstly, I would assume that your IPC events are async, in other words the parent process starts the IPC process and forgets about it / continue with it's own thing. If not (and they are sync) then there is no way that you can do what you are describing because the server will be expecting those child IPC processes to complete and return to the parent at some stage and if the parent process is not at the IPC event, it will go into an error state.


The second thing that I'm worried about is calling the API from within your child processes - while this is probably stil ok'ish when using the management API, I would advise absolutely do NOT do it with the sourcecode.workflow.client API


Cheers,


 

Badge +1

Hi Gerhard,

 Thanks for the reply.  The IPC events are running async, so that should avoid the parent process going into an error state.  I am just curious as to what the differences are around using the management API vs the client API.

I'll make sure this is an absolute last resort.

Cheers,

Arnie 


 

Badge +6

Using the client api from the KO (server) object might cause process threats to become deadlocked, thereby crashing or stalling the K2 server. I think it might be slightly less relevant when one process instance talks to another one, but still I would be very cautious with that.


Cheers,

Reply