Not able to get idfworkitem control in my auto activity

rohitmadar1
edited November 26, 2014 in Documentum #1

Hi,

We are moving our auto activities from process builder to xCP 2.1.

Now, I went into trouble when i saw that xCP doesn't recognize IDfWorkItem automatically and i have to define its mapping in xCP. But i don't know how to do this as arg0 (Destination) has few parameters and I don't know how to resolve its reference from source. Please see below screen.

xCP_Mapping_Screen.JPG.jpg

I have seen one ECN disucssion where below solution has been provided of this situation. But my issue is i didn't find IDfWorkitemEx class in any jar.

##################################################################

in XCP2  your class only should ( extends DfSingleDocbaseModule ) to be able to get session (IDfSession ) using

IDfSession session = getSession();

to get IDfWorkitem of current workflow , i have work around for this

1-create method take String called ( wItemId ) for example

2- you have to assign this variable value as attached image

3-from session you can get IDfWorkitem

IDfWorkitemEx workitemEx = (IDfWorkitemEx) session.getObject(wItemId);

Please help.

##################################################################

Please help me to resolve this deadlock.

Regards,

Rohit Madar

Tagged:

Comments

  • gokul1989_1
    edited January 11, 2018 #2

    Did u manage to get IDfWorkitemEx from bpminfra.jar? Is it valid to use in xCP 2 ? Can we use this and access process variable as such which we used to do in xCP 1.

  • You have two options:

    • Use Read from Repository and type query
      select item_id as workitem_id from dmi_queue_item where r_object_id=’Task->qitem_id>’

      • Or code java service activity where you can get workitemID with
        IDfQueueItem qi = (IDfQueueItem) session.getObject(new DfId("=Task->qitem_id>"));
        IDfWorkitem workItem = qi.getWorkitem();
  • Thanks for your reply Ryan, Ya I knew to get IDfWokitem, But there is a class IDfWorkitemEx in bpminfra jar, Is it valid to use the same in xCP 2.x which we use in xCP1.x, to access Process variable via code (workitemEx.getPrimitiveVariableValue). Is it valid to do so? Or is there any way to access the process variable via code in xCP2?

  • Yes it is valid. Just do it :)