This content has been archived.

Table of Contents

Troubleshooting: "Error: Flow Not At Task" with incorrect use of WriteNow parameter in Obj-Save method

Summary

When selecting a work object from the worklist, you receive the following error message:

The flow this assignment corresponds to is no longer at this task.

To avoid this situation, check for common conditions that can cause this problem. Explicitly restarting the flow at a specific assignment will allow processing of the work object to resume.

Explanation

A work object can have multiple assignments, which Process Commander synchronizes. Occasionally, this synchronization of the work object and its assignments can be broken.

Here are the most common causes of a missing flow triggered by a break in the synchronization of the work object and an assignment:

  • The application includes an activity that calls the Obj-Save method with the WriteNow parameter set inside of the process flow.
  • This is a misuse of the WriteNow parameter. If the enclosing transaction then fails for some reason, the object that was saved is now out of synch with the work object.
  • Deselect the WriteNow parameter if it is checked in the Obj-Save method of an activity inside a process flow.
  • An explicit Commit is added to a rule during the processing of a transaction.
  • The Service Level Agreement (SLA) agent may be trying to process the assignment, which is locked by you or another user. If advanced lock management is turned on, set the Lock Retries to zero (0) for SLA rules.
  • A corresponding flow on a work object is at a different task. That is, pxTaskName on assignment and pyLastFlowStep in the pxFlow page differ because any of the following conditions exist:
    • The Assignment saved the WriteNow parameter while the work object was being processed.
    • The work object was reopened from the database and saved.
    • The work object saved the WriteNow parameter, triggering an error that causes the transaction to roll back.

Suggested Approach

To restart the flow at an assignment, create an activity that uses Work-.RetryProblemFlow to restart the flow and recreate the assignment:

  1. Create an activity (for example, FixProblemFlow) with the following steps:
    1. Call the method Obj-Open-By-Handle with the pzInsKey of the work object you want to open.
    2. Call the standard activity Work-.RetryProblemFlow.
      • This activity needs two parameters, FlowName and FlowStep:
        • ​​FlowName is the name of the flow you would like to start.
        • FlowStep is the step from where you would like the flow to run.
      • ​​For example, if you have a problem with an assignment on the flow, you may want to restart the flow from the step above the assignment so  the assignment can be re-processed. If you are not sure how to get the Flow step name, you can find it by viewing the Generated Java Code.
    3. Once you have these two values, pass them as parameters to the activity Work-.RetryProblemFlow.
    4. Call the method Obj-Save.
  2. Run the activity.

You can now open the work object without an error.

Additional Information

When to set the WriteNow parameter in the Obj-Save and Obj-Delete methods

Suggest Edit

75% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.