服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

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

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;
        }
    }
}

扫描关注微信公众号