cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Flexi Task Outcome Variable

Jump to solution

When using Flexi Tasks, if using a decision result to determine a state in state machine or storing any decision in a variable, how does it need to be done? 

I am using a flexi task with a 1 decision outcome. The field is hidden in the form and defaults as "Complete" (text default value). It will have additional outcomes, but this is just for testing atm. It appears as though the "Complete" text input for default is not working correctly when stored in a single line variable. "Error in task. Input string was not in a correct format", and the only value I'm seeing that would be obvious is the outcome. Is it possible that this uses a numeric

similar to SharePoint statuses instead of text result?

State Machine

  • Resubmit
  • Complete - Inactive/Blank/End WF

Decision Form Control Settings

  • Connected to: Decision
  • Specify default value: "Complete" (flexi outcome is also set to: "Complete")
  • Visible: No
  • Enabled: Yes
  • Save button: Save and Submit

Flexi Settings (error event here)

  • Store Outcome in: txtOutcome

If Condition

  • If value txtOutcome = "Complete", Change State = "Complete"
Labels: (1)
0 Kudos
Reply
8 Replies
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

Its not completely clear to me what you are trying to do, a screen shot of where your error is occurring in the workflow history would be helpful.  You can easily set a variable on a flexitask branch such as the Approve or Reject branch to use for comparisons down the line.    You could also set "Change State" based on the branch it goes down (Approve or Reject) and have it go to different states accordingly.

0 Kudos
Reply
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

(PS:  You'd add the set variable, or Change State on the correct branch, respectivey)

0 Kudos
Reply
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

When you store the variable to be compared to down the line, how would it need to be stored? I am storing the "Outcome" in a single line of text variable right now. Would that create any issues?

I only ask because I have seen results be numeric instead of the text that is displayed, if that makes sense.

Example: Outcome Value is calculated (Decision+" - "+Response); the Decision/Outcome value is always "-1" no matter what is selected, it is NOT the text outcome. If this is always -1 and the outcome is stored in a variable then I cant progress the workflow.

0 Kudos
Reply
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

Yes you are correct, the results are showing the "ID" value of the Outcome you selected.  These IDs are stored up in the database this way.   If you "view source' or "inspect element" on these outcomes in your browser you will see the ID that each one is represented by.   The ID results should remain consistent as long as you are in the same environment and hitting the same content DB each time (I think if multiple servers were involved there could be the possibility of these IDs being different across the servers but I wouldn't worry about this unless you actually test and run into this).   

0 Kudos
Reply
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

In my workflow my flexi task has 3 outcomes all with -1 activity IDs and another flexi that has all branches as 117 activity ID through IE Inspect Element.

Is there a way to adjust this?

0 Kudos
Reply
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

Are you still in workflow preview? Once you publish and start the workflow the IDs should reflect different values. In the workflow designer they are all -1 though.

Reply
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

.... Wow, really that simple?

Thanks a lot, I been trying to figure this out for a while now and all I had to do was publish to get the IDs working properly

Everything works now. 

0 Kudos
Reply
Workflow Hero

Re: Flexi Task Outcome Variable

Jump to solution

Glad I could help. I wasted a lot of time too then I had a similar task.

0 Kudos
Reply