WorkflowManagmentServer.GoToActivity within a server code event

Last post 04-17-2008, 9:02 AM by GLouw. 3 replies.
Sort Posts: Previous Next
  •  04-16-2008, 9:15 AM 23229

    WorkflowManagmentServer.GoToActivity within a server code event

    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

     

    Filed under: ,
  •  04-16-2008, 9:34 AM 23230 in reply to 23229

    Re: WorkflowManagmentServer.GoToActivity within a server code event

    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,

     


    Gerhard
    -----------------------------------------------------------------------------
  •  04-17-2008, 8:24 AM 23249 in reply to 23230

    Re: WorkflowManagmentServer.GoToActivity within a server code event

    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 


     

  •  04-17-2008, 9:02 AM 23251 in reply to 23249

    Re: WorkflowManagmentServer.GoToActivity within a server code event

    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,


    Gerhard
    -----------------------------------------------------------------------------
View as RSS news feed in XML