cancel
Showing results for 
Search instead for 
Did you mean: 

Complete step on a Workflow programmatically

Charles_
Champ in-the-making
Champ in-the-making

Hi,

I have a workflow and I would like to complete steps without any action of the user. That means istead of going inside each document to click on the finish button, I would prefer to implement one common button relating to a list of documents, which complete the same step for each document of the list.

Is that possible and how can I achieve that task?

Thanks

Charles

1 ACCEPTED ANSWER

Mariana_Cedica
Star Contributor
Star Contributor

You can use the following method from DocumentRoutingService:

/**
* Ends a task
*
* @param session
* @param task
* @param data
* @param status name of the button clicked to submit the task form
*
* @since 5.6, was on RoutingTaskService before
*/
    void endTask(CoreSession session, Task task, Map<String, Object> data,
            String status) throws ClientException;

where

  • the name of the button is the id of the button you configured on the Tab Form on the Studio side when configuring your task node.
  • data is a hashMap containg all the nodes and workflow variables

View answer in original post

1 REPLY 1

Mariana_Cedica
Star Contributor
Star Contributor

You can use the following method from DocumentRoutingService:

/**
* Ends a task
*
* @param session
* @param task
* @param data
* @param status name of the button clicked to submit the task form
*
* @since 5.6, was on RoutingTaskService before
*/
    void endTask(CoreSession session, Task task, Map<String, Object> data,
            String status) throws ClientException;

where

  • the name of the button is the id of the button you configured on the Tab Form on the Studio side when configuring your task node.
  • data is a hashMap containg all the nodes and workflow variables
Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.