You are viewing limited content. For full access, please sign in.

Question

Question

Send the user to an Error form is workflow fails

asked on February 18, 2016 Show version history

Good morning. 

Trying to figure out a way to send users to an "Error" form if the workflow we are running fails.  The process we have is basically users submit a form, the form starts a workflow, the task waits for the workflow to finish, then sends the user to another form with variables from the first one. 

The workflow has a Custom Query where we need to check if it fails.  My thought is to have a Try-Catch and if it does fail then to create a Error token, assign it Yes, write it back to the form to a hidden "Error" single line, then have a gateway that checks.  If the Error single line is Yes, send it down the error task.

I have made it so the Query fails and see that part is working fine.

However the task in Forms needs to wait for Workflow to complete.  But if its an error it does not seem to move on.  If I don't wait for it to complete, the next form is not going to have information that comes from the workflow.  Here is my gateway:

Is there a better way or am I missing something?  There are going to be multiple forms through the whole process and each Form is going to have a workflow.  The workflow needs to finish before moving to the next form since information from that workflow is going to be passed to the next form.  However if the workflow fails we would like the next Form to be an error form.

 

Thanks,

Chris

 

0 0

Replies

replied on February 18, 2016

That sounds reasonable. But why would the query fail?

0 0
replied on February 18, 2016 Show version history

I agree.  The form fields that the Query are comprised of are all required fields.  So the Query should never fail as all info needs to be entered on the form.  This is just a requirement from the client that they want to have error handling for all Query steps.  So they would like to have an error form.

0 0
replied on February 18, 2016

If the workflow terminates, the service task in Forms would suspend. So you get a chance to manually retry it if it failed because of something like the data soucre server being down. If you make the workflow always succeed, then you lose that functionality. Is that acceptable to them?

0 0
replied on February 18, 2016

I believe they are looking for more than that.  From what you posted it seems like the only way the user would know that the workflow failed was that they simply would not get the next task.  Since the workflow failed and the task is waiting for the workflow to finish (required since the next form uses variables from the first), the user just would not get the next task.  They are looking for the next task to be an error page with the info from the failed first form or something along those lines.  If the workflow completes, the next task is simply the next form.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.