• 1 reply
  • Latest Post - ‏2013-08-13T01:49:25Z by KaranBal
2 Posts

Pinned topic Workflow Issue for Automated Step

‏2013-08-01T07:36:39Z |


I am trying to execute automated step through Java code. I have written logic to set several exit values & based on that value the flow will go to next step.

The problem I am facing that, the exit values are setting as per logic but it is stucked on that automated step and not moving to next step. I have written my logic in out(WorkflowStepFunctionArguments inArgs) method. After that I have moved my code in timeout(WorkflowStepFunctionArguments inArgs) method, using that it is moving to next method randomely not as per the logic.

Kindly suggest the solution.


Step 1: OrApproval

Step 2: Go to three parellal steps after approval

Step 3: Merge Step

Step 4: Go to decider step. It is automated step having several exit values and based on that respectve next steps.



public voidtimeout(WorkflowStepFunctionArguments inArgs) {


try {


PIMCollection<CollaborationItem> collaborationItems = inArgs


ExitValue exitValue;

WorkflowStep workflowStep = inArgs.getCollaborationStep()


--------  str =  some logic to set exit value.....

exitValue = workflowStep.getExitValue(str



if (exitValue == null)

exitValue = workflowStep



Logger.logDebug("..Exit Value..:"

+ exitValue.toString());



.setExitValue(caItem, exitValue);


} catch (Exception e) {

Logger.logDebug("..Exception occured in NPI workflow step processing for Rejection.."

+ e.toString());

} catch (Error e) {

Logger.logDebug("..Error occured in NPI workflow step processing for Rejection.."

+ e.toString());

} finally {


if (ctx != null) {















  • KaranBal
    108 Posts

    Re: Workflow Issue for Automated Step


    You can use the getEntryMergeState operation to get the state of the item in the merge step. If the stuck item returns 3, then the item is truly stuck in the merge step. If it returns a value less than 3, then it is just waiting for the previous split entries to show up.

    IC Link:

    If it is truly stuck, then the question on why it is stuck is harder to answer. Regardless of whether the values are properly updated or not, an item should never be stuck on an automated step unless there is an error. So check for the error. If there is no error, then try to detect a pattern as to what triggers these values to be stuck; bad data, corruption, validation errors, missing attributes etc.

    You may use the following script to move the stuck item to the next step (it will check to see if getEntryMergeState is 3 and if it is, then it will move it to the next step):
    var oColArea = getColAreaByName(sColAreaName);
    var oEntrySet = oColArea.getEntriesInStep(sStepPath);
    out.writeln("EntrySet size: " + oEntrySet.getEntrySetSize());
    var iCount = 1;
    forEachEntrySetElement(oEntrySet, oEntry)
        if(null != oEntry)
            var iEntryMergeState = oColArea.getEntryMergeState(oEntry, sStepPath);
            out.writeln("INFO:: Merge state for Entry PK ["+oEntry.getEntryAttrib(sAttribPath)+"] is: "+ iEntryMergeState);
           if( null != iEntryMergeState && iEntryMergeState == 3)
                hmResult = oColArea.moveEntryToNextStep(oEntry, sStepPath, sStepAction);
                if(null != hmResult && hmResult.size() > 0)
                    out.writeln("ERROR:: Result of moveEntryToNextStep() call: "+hmResult);
            out.writeln("WARN:: ***NULL value counter: "+iCount++);