Completed workitem performer tracking

Posted by hirenpatel on 29-Jun-2011 04:46

I need your help in following business scenario.
Ex:  Startàws1àws2àEnd
Ws1- it is a activity whose performer is any member of group name like Project leader.
            Ws1 has over due transition  to ws2.
Ws2- it is a custom adapter.
           Instance will come to ws2  when overdue of ws1 happen now here I need to know who was the performer of workitem ws1 ?
As ws1 is available to any member of group name Project Leader, so  there is a two possibility when over due happen either it is not assigned to any one or
Some one of group have done get nextwork item and saved  it so this workitem was  assigned to him.
How would we know above case in nextwork step ?

All Replies

Posted by sandips on 29-Jun-2011 05:39

To retrieve the performer name who completed the workitem in the post  script of the workstep Ws1,utilize the below code snippet.

var session = blserver.connect("ebms","ebms");
var wsi = blserver.getWorkStepInstance(session,  jst.getProcessInstanceID(),jst.getWorkstepName());
var plst = wsi.getCompletedWorkItemPerformer(); // The above API will  return list of performer for this workitem. The workitem may have gone  through number of cycle/rollback and the list contains all the performer.
var performer = plst.get(plst.size()-1); // The last value is performer  of this workitem completed just now.
jst.putDataslot("performerDS",performer);

I have already send you an email.

This thread is closed