How do you run a list workflow from a button?

  • 17 March 2016
  • 5 replies
  • 300 views

Badge +9

I found an interesting community thread:

 

https://community.nintex.com/thread/3009

 

What I gleaned came from Andrew Glasser:

The URL had to be something like the following:

 

Site URL/_layouts/15/NintexWorkflow/StartWorkflow.aspx?List={List ID}&ID=ID&WorkflowName=MyWorkflow&Source=Item URL

 

This works as far as it goes--but it leads me to the Start Workflow Screen for that Workflow.

 

I want to go farther. I don't want my user to see that screen for my workflows there is nothing I want them to set.

 

I want the workflow to just run--not stop at the Start Scree.

 

Gerard Rodriguez came up with observation that WorkflowName could be subsituted for TemplateID.  I'm going to try this with links I've created for Site Workflows as well, since everytime I recompile the link is not valid since the templateid changes.

 

 

 


5 replies

Badge +4

Stephan,

I learnt the following trick a while ago, but for the life of me, I cannot find the link where I found it.

Assuming you have the link and the button set, try this:

1) Go to Workflow Settings (in the Workflow Designer for Nintex)

2) Under the "Form Type", select "Custom", and the delete the URL that pops up under "Start Page". It should look like

Now when you run the workflow, the start page will not appear. Worked will for me, many times.

Also, since you say it is a List level wokflow, I assume you have already looked into the option of enabling the workflow as a menu option?

It will show up like this

Since this does not need all the dynamic querying, this may be a better option?

Badge +9

That does accomplish the running the workflow from the menu without going through the start screen.

Unfortunately, my url no longer works to automate it. In what I've been able to capture from seeing the URL flash before me it uses "StartWorkflowAuto.aspx" plus the newest TemplateID--which means somehow the the templateid must be discovered every compile.

I tried using "StartWorkflowAuto.aspx" with the WorkflowName and it gave me a bad Url.

Badge +4

Stephan,

I will need to delve into this a little more, but here is another idea (rather crude, but might work).

What if you had two workflows - 1) your main workflow, and 2) one that just starts the first workflow?

Your button, could always be connected to the Second Workflow, so you do not have as many changes to it. The first one can change as many times, but it should not really matter.

And finally, for the first workflow, apply the trick for the start form I suggested, and theoretically, the users click the button, should not see a start form, the workflow kicks-off , and starts the MAIN workflow..

Badge +9

It is a thought. I'll have to play with it.  I'm still not certain how that would get around the Start Screen. I understand that a workflow being called by another could change and still be called correctly--as long as no parameters change.

I appreciate your creativity.

Badge +2
Thanks, it works for me
You made my day

Reply