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

Question

Question

Using web application to launch a workflow

asked on December 8, 2015

I have a customer that is currently trying to start a workflow via a web application. When the application has its submit button hit it runs this section of the code. The workflow server and workflow name are obtained via an xml file for the configuration of the application. All of the variables seem correct with the exception where it hits WF.StartWorkflow(parameters). It passes this section with no errors though it does not start the workflow when checking the designer. I have attempted to change the parameters being passed in to all null values. Is there another method to starting the workflow via web application?

0 0

Answer

SELECTED ANSWER
replied on December 9, 2015 Show version history

Looking at the code, there are a few questions. The "allParameters" variable is not used anywhere. I also don't see where the workflow has any starting entry parameters set. Those are just some observations.

In regards to starting Workflows, Looks like the general consensus is to use the Workflow REST Api. Here is some posts related that should get you started in the right direction.

https://answers.laserfiche.com/questions/70701/REST-API--Workflow-Web-Service 

https://answers.laserfiche.com/questions/82063/StartWorkflowDirectly-not-in-SDK-Documentation

2 0
replied on December 9, 2015

I am currently just wanting to start the workflow without having a starting entry. The method either accepts all the parameters listed in the links you had sent me or just pass in the single object parameter and have an established connection to workflow.

0 0
replied on December 10, 2015

I went ahead and changed the code to use the web services for workflow and this worked. I utilized the code from the PDF that was provided.

0 0

Replies

replied on December 9, 2015

StartWorkflow queues a message to the message queue that WF will try to process later. You can use StartWorkflowDirectly to tell the WF server to start the workflow immediately.

One thing to keep in mind is that unless you have Kerberos set up, your web app will authenticate to the WF Server as the application pool user. So what you might be seeing is that user does not have rights to write to the message queue. You may have to give that user rights to edit the workflow. StartWorkflowDirectly should at least give you an access denied error if the user does not have the appropriate security.

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

Sign in to reply to this post.