How to get a IDfWorkitem from IDfWorkflow?

Options
freddybrito
edited October 10, 2008 in Documentum #1

Hi i am try to get al activity asociates

Best Answer

  • mszurap
    edited October 8, 2008 #2 Answer ✓
    Options

    Hi,

    select * from dmi_workitem where r_runtime_state in (0,1) and r_workflow_id='yourworkflowid'

    This dql lists your workflows dormant and acquired workitems. If workitems can be suspended, then take into account that too.

    You should get a copy of Server Object Reference PDF.

Answers

  • mszurap
    edited October 8, 2008 #3 Answer ✓
    Options

    Hi,

    select * from dmi_workitem where r_runtime_state in (0,1) and r_workflow_id='yourworkflowid'

    This dql lists your workflows dormant and acquired workitems. If workitems can be suspended, then take into account that too.

    You should get a copy of Server Object Reference PDF.

  • freddybrito
    edited October 10, 2008 #4
    Options

    My Code, hope it will be helpful

    IDfWorkflowEx wfe = ( IDfWorkflowEx ) session.getObject(id);

    String dql = "select * from dmi_workitem_s where r_runtime_state in (0,1) and r_workflow_id='" + wfe.getProcessId() + "'";

    IDfEnumeration objectsByQuery = session.getObjectsByQuery( dql , "dmi_workitem" );

    IDfWorkitemEx wiEx = new DfWorkitemEx();

    if ( objectsByQuery.hasMoreElements() ) {

    wiEx = (IDfWorkitemEx) objectsByQuery.nextElement();

    }

    Thank's, for all support.