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

Question

Question

Redirect Form with Result From Workflow

asked on September 28, 2018

I am trying to take the return value from a workflow service task and use it to redirect the user to a new page. I can't seem to figure out how to do the redirect.

In a form start event, I set the "Thank You Message" option to redirect to a website with a form field value:

This works for any field that the user has entered into the form.

However, if I kick off a workflow process when the form is submitted (it posts the form data to web service that returns an identifier) and use Set Business Process Variables in the workflow to return that identifier to Forms in the formField, the redirect does not get that value.

It is blank or has whatever the user entered. The Workflow Service Task is set to wait for finish.

I can add an email task after the workflow and it will email me the formField with the new value.

How can I have Forms to update the original redirect set in the Start task with the new value for formField?

0 0

Answer

SELECTED ANSWER
replied on September 28, 2018 Show version history

The problem you're having is that the "Run WF" task occurs after the Thank You message has already been displayed. i.e., Submit > Thank You/Redirect > Workflow > End.

The bigger challenge you're facing is that you cannot trigger a Workflow and then have it send data back to an in progress submission.

Moving from a User Task (including a Start activity) to any non-user activity ends the user's step, which makes sense when you think about it because you wouldn't really want a webpage stuck waiting for a response from Workflow or some other activity as it would just seem unresponsive.

Unless you build something that works within the form page itself (JavaScript, etc.) then there's no way you'll be able to update the variable before the "Thank You" page redirect occurs.

 

Note that the "Wait for the Workflow to finish" setting refers to the flow of the underlying Business Process, not the form/submission, so in your diagram all that does it delay the "End" event until the Workflow is complete.

0 0

Replies

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

Sign in to reply to this post.