Starting sub-process on another WF Server (not in K2 Farm)

  • 24 September 2014
  • 2 replies
  • 1 view

Badge +1

Hi all.

 

In K2 BlackPearl I can start sub-process (synchronous or asynchronous) by using IPC Event activity in my workflow. But I can do it only with workflow, witch was deployed in single solution in single WF server.

 

Is it possible to run as sub-process another WF process deployed on another WF server (not in K2 Farm)?

 

Example: I have two servers - K2Local and K2Remote.

on K2Local I deploy K2LocalWorkflowMain, and on K2Remote I deploy K2RemoteWorkflowChild workflows. And I need configure the following scenario - on second step in K2LocalWorkflowMain workflow process I want to start new K2RemoteWorkflowChild workflow instance asynchronous.

 

Is this possible do with IPC Event Activity? Or I need do it by code (using K2 Workflow API) to start workflow instance on remote server?


2 replies

Badge +10

Okay I haven’t had the time to test this fully but conceptually I believe these steps would be worth a try using the IPC Event. At this point I see 2 problems to overcome:

  1. How to specify the remote K2 Server to call when using the wizard.
  2. How to get access to remote Process’ datafields and xml fields to transfer and receive information from when it’s not part of the same project or even on the same server.

First off create another Environment Variable using the Workflow Server Category. For the connection string I’d go to the remote server’s workspace/Management/Environment Library and navigate down to the Environment Fields and just copy whatever are the Workflow Server connection value’s in its own environment. This should give you a valid connection string. While you’re there give the K2 Service account of the originating server start permissions on the process.

 

Next copy the process kprx file you are trying to start and add it your project and exclude it from build.

 

Add a datafield that would have the correct Project NameProcess Name for the remote project.

 

Now you should be able to add an IPC event and choose the datafield and when it asks for the design time values simply browse to your process. In the Workflow Connection choose the remote K2 server in the Workflow Servers dropdown.

 

Give that a shot and let us know if it works.

 

Regards,

Tim

Badge +1

Great, it's work!

Thanks for your solution!

Reply