Shark api 应用:获得父流程(parent process)

发表于:2007-06-22来源:作者:点击数: 标签:
ExecutionAdministration ea = Shark. getInstance (). getAdminInterface (). getExecutionAdministration (); ea. connect (userName, password, engineName, null); // subProcId为子流程序号 wfeas = ea. getProcess (subProcId). get_sequence_history

   

ExecutionAdministration ea = Shark.getInstance().getAdminInterface().getExecutionAdministration();
ea.connect(userName, password, engineName, null);

// subProcId为子流程序号
wfeas = ea.getProcess(subProcId).get_sequence_history(0);

if ( wfeas != null )
{
    for ( int i = 0; i < wfeas.length; i++ )
    {   
        if ( wfeas[i].event_type().equals("processCreated") )
        {
            WfCreateProcessEventAudit wpea = (WfCreateProcessEventAudit)wfeas[i];
            // parentProcId 为父流程序号
            parentProcId = wpea.p_process_key() == null ? "" : wpea.p_process_key();

            break;
        }
    }
}

原文转自:http://www.ltesting.net