I've a K2 process using IPC events that calls a child process.
Process1 is the parent process and Proc1 is the child process.
From a client application the following code is called.
con = new SourceCode.Workflow.Client.Connection();
SourceCode.Workflow.Client.ProcessInstance procInst = con.CreateProcessInstance(@"K2_IPCProcess1");
procInst.DataFields["ProcessToCall"].Value = @"K2_IPCProc1";
con.StartProcessInstance(procInst, true);//Calling synchronously
string processInstanceID = procInst.ID.ToString();[Is able to return the ProcessInstanceID]
bool isStarted = Convert.ToBoolean(procInst.DataFields["ChildProcessStarted"].Value);
Response.Write("The process instance id of the process is:" + processInstanceID+"<BR>");
Response.Write("Is child process started:" + isStarted.ToString());[The value is always false]
While using the IPC wizard:
In the Process, Folio and Type of Call wizard.
Specify the process to be called.
Process: ProcessToCall(is a field that says, which process to invoke when the parent process is started. This is passed by the custom code above.)
Select how to call the process.
Synchronous(wait for the child process to complete)
In the Map a Process Field wizard, I've selected the Data Direction as "Receive data from child process"
Parent Process (this process)
Field Name: ChildProcessStarted (is a boolean value initially set to false)
Field Name: ProcessStarted (this is a field in the child process which updates data field ProcessStarted to true)
So, the value of ProcessStarted should be assigned to ChildProcessStarted field when the Parent process is run through code.
But, it never updates the ChildProcessStarted field to true though the value of ProcessStarted is set to true.
Can anyone provide their comments.