Error Analysis and Solution of dm_workflow_e_trans_max_output_cnt_exceeded in ECM

Source: Internet
Author: User
2012-11-10 09:25:51,146 ERROR [STDERR] DfException:: THREAD: http-0.0.0.0-9160-1; MSG: [DM_WORKFLOW_E_TRANS_MAX_OUTPUT_CNT_EXCEEDED]error:  "A maximum of 1 output ports can be selected. (The maximum is defined in the activity's transition_max_output_cnt attribute.)"; ERRORCODE: 100; NEXT: null2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.docbase.DocbaseExceptionMapper.newException(DocbaseExceptionMapper.java:57)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.MessageEntry.getException(MessageEntry.java:39)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.DocbaseMessageManager.getException(DocbaseMessageManager.java:137)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.checkForMessages(NetwiseDocbaseRpcClient.java:305)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.netwise.NetwiseDocbaseRpcClient.applyForBool(NetwiseDocbaseRpcClient.java:349)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection$1.evaluate(DocbaseConnection.java:1108)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.evaluateRpc(DocbaseConnection.java:1046)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.applyForBool(DocbaseConnection.java:1101)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.apply(DocbaseConnection.java:1086)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.impl.docbase.DocbaseApi.witemSetOutput(DocbaseApi.java:1240)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.DfWorkitem.setOutput(DfWorkitem.java:406)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.fc.client.DfWorkitem.setOutputByActivities(DfWorkitem.java:879)2012-11-10 09:25:51,147 ERROR [STDERR] at com.documentum.bpm.DfWorkitemEx___PROXY.setOutputByActivities(DfWorkitemEx___PROXY.java)

When you use ECM to throw the process, the above error is reported after the execution is complete.

The above is the details of the error.

Solution:

  1. From the MSG of the error, there are more outlets for the process. The maximum value defined in activity is "1 ".
    Use process builder to find the r_object_id of this process level, and then use dql to obtain the value of transition_max_output_cnt.
    Select transition_max_output_cnt from dm_activity where r_object_id = '4cxxxxxxxxxxxxxxxxx '.
    The obtained value is "1", which is exactly the same as the prompt information.
    In fact, this value is the value in the brackets of the select up to [] Next activities option in the Transition tab on the activity configuration page.
  2. Since the maximum value is 1, what is the input output port?
    The output port definition must be clarified here. Output port refers to the flow exit of the current node defined by the Process Template. In fact, it is the number of connections (forword or reject) from the current node to the next node)
    By tracking the above error logs, decompile the code to get:
    The output port value is obtained from the dm_process (Process Template.
    This is because there are two lines (successful and failed) from the current node to the same next node, so there are two output port values (output: 0 and output: 1)

    IDfWorkitem workitemid = (IDfWorkitem)session.getObjectByQualification("dmi_workitem where r_object_id='"+sWorkItemId+"'");IDfList forwardActList = workitemid.getForwardActivities();if(workitemid.getRuntimeState() != IDfWorkitem.DF_WI_STATE_ACQUIRED) {workitemid.acquire();}IDfActivity actold = (IDfActivity)forwardActList.get(0);    IDfList actList = new DfList();    actList.append(actold);//workitemid.setOutputByActivities(actList);        IDfList outputPorts = new DfList();        IDfId workflowId = session.getIdByQualification("dm_workflow where r_object_id='4d00000b8001f147'");        IDfWorkflow wf = (IDfWorkflow)session.getObject(workflowId);        IDfId procId = wf.getProcessId();        System.out.println("Process id="+procId.toString());        IDfProcess process = (IDfProcess)session.getObject(procId);        int seqno = getActSeqno(workitemid);        int seqnoIndex = wf.findInt("r_act_seqno", seqno);        if(seqno >= 0)        {            String aliasName = wf.getActName(seqnoIndex);            for(int j = 0; j < actList.getCount(); j++)            {                IDfActivity act = (IDfActivity)actList.get(j);                IDfId actID = act.getObjectId();                IDfList actNames = new DfList();                int numActs = process.getActivityCount();                for(int i = 0; i < numActs; i++)                    if(process.getActivityDefId(i).equals(actID))                        actNames.appendString(process.getActivityName(i));                for(int i = 0; i < process.getProcessLinkCount(); i++)                {                    if(process.getLinkSrcActivity(i).compareTo(aliasName) != 0)                        continue;                    System.out.println("process.getLinkSrcActivity(i)="+process.getLinkSrcActivity(i));                    String destActName = process.getLinkDestActivity(i);                    int destListIndex = actNames.findStringIndex(destActName);                    if(destListIndex > -1)                    {                        String srcPort = process.getLinkSrcPort(i);                        outputPorts.appendString(srcPort);                    }                }            }        }
  3. The two values are not equal. Locate the cause.
    Use Porcess builder to change the value of 1 to 2. (You can also use dql to update dm_activity after checking out)

  4. Theoretically, after the modification, the process should be able to run. However, the same error is still reported after the change.
    Continue to find the cause. Use dql to view the current dm_workflow information.
    select * from dm_workflow where r_object_id='4dXXXXXXXXXXX'

    The ID number process_id of the record Process Template is found in dm_workflow.
    Use dql to check the ID of the corresponding process template.

    select * from dm_process where object_name = 'XXXXXXXXX'

    The two are different.
    That is to say, after modifying the Process Template through process builder, the corresponding r_object_id is updated after the process template is finalized.
    You cannot use SQL to update the process_id of dm_workflow.

    update dm_workflow object  set process_id='4bXXXXXXXXXX' where r_object_id='4dXXXXXXXXXXXXXX'
  5. Try it.
    There should be other records with information about the old Process Template. I guess it should be in dmi_workitem (dm_activity instance)
    Use SQL database queries (dql cannot see enough information)
    Select * From Dmi_Workitem_R Where R_Object_Id='4aXXXXXXXX';Select * From Dmi_Workitem_S Where R_Object_Id='4aXXXXXXXX';Select * From Dmi_Workitem_Sp Where R_Object_Id='4aXXXXX';Select * From Dmi_Workitem_Rp Where R_Object_Id='4aXXXXXXX';

    Sure enough, the r_act_def_id columns respectively record the ID of the old dm_activity.
    Similarly, dql is changed.
    Success ....

  6. Legacy problems:
    IDfList forwardActList = workitemid.getForwardActivities();if(workitemid.getRuntimeState() != IDfWorkitem.DF_WI_STATE_ACQUIRED) {workitemid.acquire();}IDfActivity forwardAct = (IDfActivity)forwardActList.get(0);    IDfList actList = new DfList();    actList.append(forwardAct);    workitemid.setOutputByActivities(actList);            workitemid.complete();

Here we clearly specify the successful route. Why do we need to find the failed route?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.