Capture request parameter to a workflow variable for tool use

Confluence User - 28 Jul, 2017

I have a need to use a request parameter (passed in the URL that starts a process) as a parameter in a Tool plug-in. The Tool happens to be the first thing after the Start. However, if I use #requestParam.name# inside the tool I do not get the request parameter value passed to the Tool. I find that I can capture the requestParam to a hidden field on a form and then to a workflow variable if I map such a form to Run Process. But I do not want a form displayed there that requires a Submit. I want to go directly to the Tool with the requestParam accessible and usable by the Tool and then go to a Form which uses the data retrieved by the Tool and that is passed to it in workflow variables.

How can I do this?

Thanks, Bill

forms;processes

7


28 Jul, 2017
confluenceUser
confluenceUser

Hi,

you can do this by using the POST request URL to start process that can be retrieved on the process overview. I have just implemented the same scenario recently. It will look something like this:

https://domain/jw/web/json/workflow/process/start/FlickElectric:20:PauseOrResumeNotification?var_mode=pause&var_notification_id=134399xyz

The last two components are the workflow variables that can be used in the process without the request hash variable.

hope this helps.

 

28 Jul, 2017
confluenceUser
confluenceUser

More information can be found on the JSON API knowledge page.

28 Jul, 2017
confluenceUser
confluenceUser

Hi Eric, I need to use the "Link To Run Process" to start this process because I need to take the user directly into the first form by going to this link from their browser. I believe the process you suggests does start the process with the workflow variables but it cannot start the user at the first form the way the "Link To Run Process" does. And the "Link To Run Process" does not seem to accept the var_variable syntax.

28 Jul, 2017
confluenceUser
confluenceUser

So you want that a user clicks on a link that includes some parameters, then have a tool process these parameters in some form and then immediately display a form to the user which has some content based on the processed variables, correct?

28 Jul, 2017
confluenceUser
confluenceUser

Correct!

28 Jul, 2017
confluenceUser
confluenceUser

I am fairly sure I did that somewhere before... have you tried passing the variables without var_ with the "run link to start process"? So for example attaching "&status=resume"?

28 Jul, 2017
confluenceUser
confluenceUser

Yes, but I cannot access the request parameter variables using #requestParam.status# from within the tool. The only thing that seems to work is to capture them in a hidden field mapped to a workflow variable in a form assigned to Run Process. But the form then must display and be submitted. I want to go straight to a form after the tool has retrieved values based upon the request parameter variable.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print