DQL help: have dmi_workitem ID; Need to get last MANUAL performer name

athati
athati Member
edited May 4, 2012 in Documentum #1

Hi,

I have dmi_workitem ID. I need to get last MANUAL performer name and group. Performer is "Single User from a group" and have an auto-activitiy between the current manual performer and previous manual performer.

I need a DQL may be single or multiple.

I tried this following assuming given dmi_workitem ID is GivenWIId:

select r_workflow_id from dmi_workitem where r_object_id='GivenWIId'.

Got the result into WorkflowId then executed the following:

select r_last_performer from dm_workflow where r_object_id='WorkflowId' ENABLE (ROW_BASED)

I am getting the final result as Workflowsupervisor name that is coming from auto-activity because for every auto activity's performer is Workflowsupervisor.

My problem is how can I get "last MANUAL performer name" or "last last performer name".

Please share your knowledge and experiences for figuring this out.

Thanks.

ta

Tagged:

Best Answer

  • DCTM_Guru
    DCTM_Guru Member
    edited May 4, 2012 #2 Answer ✓

    Make performer of your auto activity to be performer of previous activitiy.  Then your data mapping will have correct value.

Answers

  • DCTM_Guru
    DCTM_Guru Member
    edited May 4, 2012 #3

    What are you doing in the auto-activity?  In other words, why dont you just capture the value of the previous performer in the autoactivity itself? 

  • athati
    athati Member
    edited May 4, 2012 #4

    Thanks Johnny.

    In my auto activity I am trying to capture the last performer name into an attribute of my custom type, but i do not see such last performer name attribute on the left pane of my Process Data Mapping activity. Using Copy function I captured it into my custom attribute. It is giving a value of Workflowsupervisor. I tried to add more attributes by right clicking on the task, but all options are grayed out-disabled. I could not add. Where exactly I can find Last performer name? Under task or workitem or workflow? I explored all, but I could not find and also I could not do right click and add such attribute.

    Note: I see multi valued performer_name under workitem. I could copy this multi valued attribute through copy funtion. i am cobfused.

    I am not sure I made my issue clear.

    Please advsie me.

    Thanks.

    ta

  • DCTM_Guru
    DCTM_Guru Member
    edited May 4, 2012 #5 Answer ✓

    Make performer of your auto activity to be performer of previous activitiy.  Then your data mapping will have correct value.

  • KSMatson
    KSMatson Member
    edited May 4, 2012 #6

    Hi, apart from the suggestions Johnny gave you, if you want to use DQL to get last manual performer, you can use the following query.

    select w.r_performer_name

    from dmi_workitem w, dm_activity a

    where w.r_act_def_id = a.r_object_id

    and a.exec_type = 0

    and r_workflow_id in (select r_workflow_id from dmi_workitem

    where r_object_id = '4axxxxxxxxxxxxx')

    and r_runtime_state = 2

    order by w.r_act_seqno asc

    enable(return_top 1);

    Plug in the workitem id in the query. Please refer to the object reference guide for what the attributes signify. Note also that adding the group information will only make the query more complex and its not trivial to do so.

  • athati
    athati Member
    edited May 4, 2012 #7

    Thanks Johnny.

    EXCELLENT JOHNNY for the clue. It resolved my last performer issue...HATS UP TO YOU !!!

    Thanks.

    ta

  • DCTM_Guru
    DCTM_Guru Member
    edited May 4, 2012 #8

    Make sure your mark answers as correct or helpful.  This way people who have similar issues can quickly see from the search results on which threads provides answers or helpful hints.

    You have posted a lot of questions, but only a few you have marked as one of these.