WebService IPC Activity

rated by 0 users
This post has 7 Replies | 2 Followers

Top 75 Contributor
Posts 62
Points 189
amankazi Posted: Mon, Jun 22 2009 9:11

Greetings,

The process instance will be created for the Job. A Job can have multiple cases, the job should not be completed unless all the cases are completed. To achieve this I have created a main process and a Sub process. As sub process can be completed but the Job (Main process should not unless the sub process instances are completed).

For spliting the Job into case I have a logic defined in the Web Service, where the Job will get splitted into cases. I have to call the Webservice in the IPC event. But I am not able to understand which part of the IPC event I need to write the code. I right click the event in the IPC activity and inside that I see a Windows WorkFlow. I right clicked the IPC event in that and said View Code in the _ExecuteCode I wrote the code to call the webservice. But the code execution throws the runtime error.

Please help to understand and write the code in the event. It was pretty easy in the K2.Net 2003. I am not getting the option in the K2 Back pearl.

Thanks in advance

Aman

  • | Post Points: 4
Top 25 Contributor
Posts 228
Points 1,010
jan replied on Tue, Jun 23 2009 1:03

Hi Aman,

Please have a look at this exelent post (http://www.k2underground.com/blogs/pitchblack/archive/2008/08/26/looping-through-an-activity-for-each-item-returned-from-a-smartobject-list.aspx)... at the end, with the succeding rule of the activity hosting the IPC event, you will be able to achieve what you need.

In the meantime, read the entire post, it gives you a way to launch dynamic multiple IPC. And with the SmartObject, it is easier than in K2.net 2003.

HTH

Jan
The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.

  • | Post Points: 4
Top 75 Contributor
Posts 62
Points 189
amankazi replied on Thu, Jul 2 2009 11:09 PM

Greeting Jan,

The post was really helpful to understand how smartobjects can be used even to create the Sub-processes for the main process.

My main process should not move to the next activities till all the sub-process instances are completed. How can this be achieved?

Thanks in advance

 

  • | Post Points: 4
Top 25 Contributor
Posts 223
Points 713
maxpirate replied on Thu, Jul 2 2009 11:30 PM

In the IPC  Event wizard, set synchronous in 'select how to call the procss'. Main process would wait for all the activities to be completed in the child process

----------

Cheers

  • | Post Points: 4
Top 75 Contributor
Posts 62
Points 189
amankazi replied on Thu, Jul 2 2009 11:45 PM

Thanks, for the prompt response.

I would like to know, How can I check the count of sub-process instance running for the main process ?

 

  • | Post Points: 4
Top 25 Contributor
Posts 228
Points 1,010
jan replied on Fri, Jul 3 2009 3:59

You have several ways to achieve this.

  1. if you need to count the number of IPC instances finished, you can add a server event which is going to increment a process datafield (int type).
  2. if you just need to continue your parent process when all your instances are completed, you just need to add a succedding rule to your activity hosting the IPC event (the succedding rule is "all of ActivityINstanceDestinationStatus are equal to Completed"

HTH

Jan
The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.

  • | Post Points: 4
Top 75 Contributor
Posts 62
Points 189

You are awesome, you always explain to the point.

I have archived the functionality using the Succeeding rule. I got the option in the white paper which you had suggested.

Thanks a lot Jan.

  • | Post Points: 4
Top 25 Contributor
Posts 228
Points 1,010
jan replied on Sat, Jul 4 2009 10:43

;-)

I'm glad, you sorted out. Please remember to change the thread status when a valid answer has been given.

Jan
The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.

  • | Post Points: 1
Page 1 of 1 (8 items) | RSS