Question

Photo of Dillan Cagnetta

0

Message: "The selected workflow is not in a state that requires you to enter information. "

I keep getting this on when initiating a workflow from the Person Page

The workflow does

  1. Set Person
  2. Persist the Workflow
  3. Rename the Workflow
  4. Assign Worker
  5. Capture Feedback

in step 5 i dont capture anything but use the User Entry Form Action

Its a manual process after which the person clicks complete

How else can I send this email notification without using the Entry Form

I assigned the worker to a specific group

 

thanks

  • Photo of David Turner

    0

    If the workflow does not have an active 'User Entry Form' action with values to be entered, you will see that message. There are other actions specifically for sending emails that you might look at instead of trying to use the User Entry Form action just for that. Take a look at the 'Send Email', and 'Send System Email' actions.

  • Photo of Ken Roach

    1

    This explanation may help others who are getting this error message.

    Summary

    If you are using the 'Activate Actions' action to keep your workflow form alive, make sure you do not have the 'Action is Completed on Success' nor the 'Activity is Completed on Success' boxes ticked.

    wfa3.jpg

    If you do - you will only be able to maintain your form once.  The next time your form runs, the workflow engine will skip the Activate Actions action, and the Activitiy will be marked complete.  If you try to open it you will get the error message, "The selected workflow is not in a state that requires you to enter information."

    Explanation

    There are two ways to keep a form 'open' in a workflow, i.e., to keep it alive.  You would do this if you wanted someone to complete the form, then you edit the form, update your changes, open it again, edit it again with new changes, update the changes etc, until you are ready for something else to happen.

    1. You can keep your form open by completing all the Actions in the Activity that contains your form, and then by re-activating the activity using Activate Activity to call your form again. 

    wfa2.jpg

    The advantage of this method is that in the workflow history (Workflow > Managed > Edit > Activities) you see your form activity being run multiple times.

    wfa9.jpg

    2. Or you can use the Activate Actions action type.

    wfa1.jpg

    This resets the completed status of all the action in the current activity ready for them to be re-run.  This allows the Open activity to run multiple times.  The advantage of this is that you only see one Open activity in the workflow history.  This activity stays alive until you are ready for it to complete, or move on to another Activity.

    wfa7.jpg

    (Idea: You could use the Add Worflow Note to track when it was changed.)

    What's Happening in the Background

    The workflow engine, when it looks for what to do next, scans through your workflow looking for the first active Activity.  Then it looks for the first incomplete Action, and it starts from there. If it finds any subsequent actions that have already been completed, it skips those actions.

    If you want your form to stay alive you need the Activity that contains your form to be Active, and you want ALL the Activities in that Action to be incomplete.

    There are two ways you can do that: by calling the Activity again (item 1 above), or by using the Activate Actions action.

    Now: here's the gotcha.  If you have the last Action in your Activity as 'Activate Actions' - this will reset all the actions in the Activity as incomplete, ready for next time.  BUT if you have the 'Activate Actions' action ticked as 'Action is Completed on Success' - what this does is reset all the prior Actions as incomplete BUT ticks the 'Active Actions' action as complete.

    wfaB.jpg

    wfa5.jpg

    This is not what you want.  When the workflow engine runs the Open activity the next time it will do everything not marked Completed, but will not do the Activate Actions action.  It will skip this action because the action has already been marked Completed.  This means your Activity runs all the way through but is not reset again for the next round.  The Action that contains your form ('Open' in this case) is then marked complete because all the Actions in the Activity have a completed status.

    wfaC.jpg

    If that was the last Activity in your workflow then the whole workflow is then marked complete.  Then, if you come back and try to access the workflow again you get the error message, "The selected workflow is not in a state that requires you to enter information."

    wfaA.jpg

    So, what to do to stop getting the error message and keep your form alive?

    EITHER

    1. Don't use the 'Activate Actions' action as the last action.  Instead, use 'Activate Activity' and call your Activity again.

    wfa4.jpg

    OR

    2. Use the 'Activate Actions' actions as your last action, but do not tick either of the Completed on Success boxes.

    wfa3.jpg