Creating 2 WorklistItem

  • 28 August 2007
  • 7 replies
  • 0 views

Badge +9

Hi All,


How to implement this ?


A task will be assigned to a User(A). The user opens the task(worklistitem) and sets it to sleep. As soon as the task is set to sleep, another worklist is created and assigned to another user (B). But the WorkList for A should not finish . It should be in sleep state. As soon as B finishes the task assigned to it, he/she will finish the Worklistitem , then only A can finish the Worklistitem assigned to it.


I tried taking 2 activities with one client event in each activity. Between the 2 activity , there is a line Rule. But I found that only if the first WorkList finishes , then only control moves to the 2nd activity thereby creating another task.


Pls guide me as to how to do this .


Thanks and Regards


 


 


7 replies

Badge +9

From what I can tell, you probably can't use K2's concept of the Sleep function (which means just pausing the workitem) as your concept of Sleep is tying the waking action to another person.


I would think that you could probably achieve this effect by:



  1. Creating a custom Status process field.
  2. At the end of the first activity, set this custom Status field to the value of Sleep.
  3. Route to the 2nd activity for action.
  4. Upon completion of the 2nd activity, route it back to the first activity.

Probably not the most ideal solution (due to the need for a custom worklist to show the extra status field).  But perhaps this might give you some ideas on designing a better solution.

Badge +9

Hi ,


Thanks a lot for replying.


Excellent stuff.


But in 2nd point , U have mentioned "At the end of the first activity, set this custom Status field to the value of Sleep". Here I have 2 points :


1>Unless the Client Event in the First activity completes, the activity will not end. This is because, the WorkList item will be set to Sleep. My requirement is that the client event in the first activity will not complete until the client event in the 2nd activity is completed. It will be paused temporarily .


2>I am not able to get as to how I will Set the Status field to the value of Sleep.


Overall, the scenario is that a task is assigned to User A who is unable to complete as he is dependent on some other inputs from User B . So he sleeps his WorkListItem and creates a Task for User B. User B completes the task. Then User A will have the choice of completing the task or once again putting it to sleep.


Pls guide.


Thanks and Regards


 


 

Badge +9

Hi,


One thing I would like to add is I am using WorkListIem.sleep() to remove the WorkListitem temporarily from User A's WorkList.


Thanks and Regards

Badge +13

Did you try to see if sub-processes using IPC will work for your solution?

 

Badge +9

Hi,


Thanks a lot for replying.


Excellent suggestion but one problem is that IPC will be in 2nd activity. To pass control from 1st activity to the 2nd activity I have to finish the Client event in the first activity. I do not want to finish the Worklistitem but set it to sleep , then create another Worklist. After the second worklist is finished, then the first activity will be finished or again put to sleep.


Infact Ur suggestion came into my mind before posting the issue, but I think it will not meet the requirement.


Pls guide.


Thanks and Regards

Badge +13

Can you route back to the 1st activity after the IPC activity is completed?

 

Badge +9

Hi Peter,


 Thanks a lot for replying.


Could you please give a brief description of the steps to do this using IPC ?


Pls guide.


Thanks and Regards

Reply