OKMWorkflow
On all methods you'll see parameter named "token". When accessing application across SOAP the login process returns a token, what is used to identify the user on all the exposed methods. From default application execution context you must use "null" value what indicates to the application must use the "user session".
On special cases you might be "promoted as Administrator" using the "administrator token".
String systemToken = DbSessionManager.getInstance().getSystemToken();
Methods
registerProcessDefinition
Description:
Method | Return values | Description |
---|---|---|
registerProcessDefinition(String token, InputStream is) |
void |
Registers a new workflow. |
Example:
package com.openkm;
import java.io.FileInputStream;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
InputStream is = new FileInputStream("/opt/files/Purchase.par");
OKMWorkflow.getInstance().registerProcessDefinition(null, is);
IOUtils.closeQuietly(is);
} catch (Exception e) {
e.printStackTrace();
}
}
}
deleteProcessDefinition
Description:
Method | Return values | Description |
---|---|---|
deleteProcessDefinition(String token, long processDefinitionId) |
void |
Deletes a workflow. |
The parameter processDefinitionId value is a valid workflow process definition. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long pdId = 5; // Valid workflow process definition
OKMWorkflow.getInstance().deleteProcessDefinition(null, pdId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
getProcessDefinitionImage
Description:
Method | Return values | Description |
---|---|---|
getProcessDefinitionImage(String token, long processDefinitionId, String node) |
byte[] |
Returns a workflow image process definition. |
The parameter processDefinitionId value is a valid workflow process definition. The parameter node is a node with a workflow in execution. |
Example:
package com.openkm;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import org.apache.commons.io.IOUtils;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long pdId = 5; // Valid workflow process definition
byte[] img = OKMWorkflow.getInstance().getProcessDefinitionImage(null, pdId, "/okm:root/sample.pdf");
ByteArrayInputStream in = new ByteArrayInputStream(img);
FileOutputStream out = new FileOutputStream(new File("/home/test/img.jpg"));
IOUtils.copy(in, out);
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(out);
} catch (Exception e) {
e.printStackTrace();
}
}
}
getProcessDefinitionForms
Description:
Method | Return values | Description |
---|---|---|
Map<String, List<FormElement>> getProcessDefinitionForms(String token, long processDefinitionId) |
Map<String, List<FormElement>> |
Returns a map with all workflow form definitions. |
The parameter processDefinitionId value is a valid workflow process definition. |
Example:
package com.openkm;
import java.util.List;
import java.util.Map;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.form.FormElement;
public class Test {
public static void main(String[] args) {
try {
long pdId = 5; // Valid workflow process definition
Map<String,List<FormElement>> map = OKMWorkflow.getInstance().getProcessDefinitionForms(null, pdId);
for (String key : map.keySet()) {
System.out.println("group:"+key);
for (FormElement fe : map.get(key)) {
System.out.println(fe);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
runProcessDefinition
Description:
Method | Return values | Description |
---|---|---|
runProcessDefinition(String token, long processDefinitionId, String uuid, List<FormElement> variables) |
ProcessInstance |
Executes a workflow on a node. |
The parameter processDefinitionId value is a valid workflow process definition. The parameter uuid can be any document, mail, or folder UUID. The parameter values are form element values needed for starting the workflow ( not all workflows need form values for starting ). |
Example:
package com.openkm;
import java.util.ArrayList;
import java.util.List;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.form.FormElement;
import com.openkm.bean.form.Input;
import com.openkm.bean.form.TextArea;
public class Test {
public static void main(String[] args) {
try {
long pdId = 8041; // Some valid workflow process definition id
List<FormElement> feList = new ArrayList<>(); // Case as part of starting workflow are required form parameter
Input price = new Input();
price.setName("price");
price.setValue("1000");
feList.add(price);
TextArea textArea = new TextArea();
textArea.setName("description");
textArea.setValue("some description here");
feList.add(textArea);
OKMWorkflow.getInstance().runProcessDefinition(null, pdId, "f86cc22d-9b50-434f-a940-b04cea9c0048", feList);
} catch (Exception e) {
e.printStackTrace();
}
}
}
sendProcessInstanceSignal
Description:
Method | Return values | Description |
---|---|---|
sendProcessInstanceSignal(String token, long processInstanceId, String transitionName) |
ProcessInstance |
Send a signal to a process intance id. |
The parameter processInstanceId value is a valid workflow process instance. The parameter uuid can be any document, mail, or folder UUID. The parameter transactionName is the choosen transaction. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long pId = 1046; // Some valid process instance id
OKMWorkflow.getInstance().sendProcessInstanceSignal(null, pId, "jump2");
} catch (Exception e) {
e.printStackTrace();
}
}
}
endProcessInstance
Description:
Method | Return values | Description |
---|---|---|
endProcessInstance(String token, long processInstanceId) |
void |
Ends a process intance id. |
The parameter processInstanceId value is a valid workflow process instance. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long pId = 1046; // Some valid process instance id
OKMWorkflow.getInstance().endProcessInstance(null, pId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
deleteProcessInstance
Description:
Method | Return values | Description |
---|---|---|
deleteProcessInstance(String token, long processInstanceId) |
void |
Delete a process intance id. |
The parameter processInstanceId value is a valid workflow process instance. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long pId = 1046; // Some valid process instance id
OKMWorkflow.getInstance().deleteProcessInstance(null, pId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
findProcessInstances
Description:
Method | Return values | Description |
---|---|---|
findProcessInstances(String token, long processDefinitionId) |
List<ProcessInstance> |
Retrieves a list of all process instances of some registered workflows definition. |
The parameter processDefinitionId value is a valid workflow process definition. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessDefinition;
import com.openkm.bean.workflow.ProcessInstance;
public class Test {
public static void main(String[] args) {
try {
// Get all workflow definitions
for (ProcessDefinition pd : OKMWorkflow.getInstance().findAllProcessDefinitions(null)) {
System.out.println("WF definition: "+pd);
// Get all process of some workflow definition
for (ProcessInstance pi : OKMWorkflow.getInstance().findProcessInstances(null, pd.getId())) {
System.out.println("PI: "+pi);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
findAllProcessDefinitions
Description:
Method | Return values | Description |
---|---|---|
findAllProcessDefinitions(String token, long processDefinitionId) |
List<ProcessDefinition> |
Retrieves a list of all registered workflows definitions. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessDefinition;
public class Test {
public static void main(String[] args) {
try {
// Get all workflow definitions
for (ProcessDefinition pd : OKMWorkflow.getInstance().findAllProcessDefinitions(null)) {
System.out.println("WF definition: "+pd);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
findLatestProcessDefinitions
Description:
Method | Return values | Description |
---|---|---|
findLatestProcessDefinitions(String token) |
List<ProcessDefinition> |
Retrieves a list of the last workflows definitions. |
Several versions of the same workflow can be registered. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessDefinition;
public class Test {
public static void main(String[] args) {
try {
// Get all workflow definitions
for (ProcessDefinition pd : OKMWorkflow.getInstance().findLatestProcessDefinitions(null)) {
System.out.println("WF definition: "+pd);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
findLastProcessDefinition
Description:
Method | Return values | Description |
---|---|---|
findLastProcessDefinition(String token, String name) |
ProcessDefinition |
Retrieves last workflow definition of some specific workflow. |
The parameter name identifies an specific workflow definitions group. Several workflow definition versions that have the same name. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessDefinition;
public class Test {
public static void main(String[] args) {
try {
ProcessDefinition pd = OKMWorkflow.getInstance().findLastProcessDefinition(null, "purchase");
System.out.println("WF definition: " + pd);
} catch (Exception e) {
e.printStackTrace();
}
}
}
findAllProcessDefinitionVersions
Description:
Method | Return values | Description |
---|---|---|
findAllProcessDefinitionVersions(String token, String name) |
ProcessDefinition |
Retrieves all workflow definition versions of some specific workflow. |
The parameter name identifies an specific workflow definitions group. Several workflow definition versions that have the same name. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessDefinition;
public class Test {
public static void main(String[] args) {
try {
for (ProcessDefinition pd : OKMWorkflow.getInstance().findAllProcessDefinitionVersions(null, "purchase")) {
System.out.println("WF definition: " + pd);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getProcessInstance
Description:
Method | Return values | Description |
---|---|---|
getProcessInstance(String token, long processInstanceId) |
ProcessInstance |
Returns the process instance. |
The parameter processInstanceId is a valid process instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessInstance;
public class Test {
public static void main(String[] args) {
try {
long piId = 8108; // Some valid process instance id
ProcessInstance pi = OKMWorkflow.getInstance().getProcessInstance(null, piId);
System.out.println("PI: " + pi);
} catch (Exception e) {
e.printStackTrace();
}
}
}
suspendProcessInstance
Description:
Method | Return values | Description |
---|---|---|
suspendProcessInstance(String token, long processInstanceId) |
void |
Suspends the process instance. |
The parameter processInstanceId is a valid process instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessInstance;
public class Test {
public static void main(String[] args) {
try {
long piId = 8108; // Some valid process instance id
OKMWorkflow.getInstance().suspendProcessInstance(null, piId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
resumeProcessInstance
Description:
Method | Return values | Description |
---|---|---|
resumeProcessInstance(String token, long processInstanceId) |
void |
Resume the process instance. |
The parameter processInstanceId is a valid process instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessInstance;
public class Test {
public static void main(String[] args) {
try {
long piId = 8108; // Some valid process instance id
OKMWorkflow.getInstance().resumeProcessInstance(null, piId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
addProcessInstanceVariable
Description:
Method | Return values | Description |
---|---|---|
addProcessInstanceVariable(String token, long processInstanceId, String name, Object value) |
void |
Add a variable in a process instance. |
The parameter processInstanceId is a valid process instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessInstance;
public class Test {
public static void main(String[] args) {
try {
long piId = 8108; // Some valid process instance id
OKMWorkflow.getInstance().addProcessInstanceVariable(null, piId, "key", "value");
} catch (Exception e) {
e.printStackTrace();
}
}
}
deleteProcessInstanceVariable
Description:
Method | Return values | Description |
---|---|---|
deleteProcessInstanceVariable(String token, long processInstanceId, String name) |
void |
Delete a variable in a process instance. |
The parameter processInstanceId is a valid process instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.ProcessInstance;
public class Test {
public static void main(String[] args) {
try {
long piId = 8108; // Some valid process instance id
OKMWorkflow.getInstance().deleteProcessInstanceVariable(null, piId, "key");
} catch (Exception e) {
e.printStackTrace();
}
}
}
findUserTaskInstances
Description:
Method | Return values | Description |
---|---|---|
findUserTaskInstances(String token) |
List<TaskInstance> |
Retrieves a list of task instances assigned to the user. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.TaskInstance;
public class Test {
public static void main(String[] args) {
try {
// Get all user task intances
for (TaskInstance ti : OKMWorkflow.getInstance().findUserTaskInstances(null)) {
System.out.println(ti);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
findPooledTaskInstances
Description:
Method | Return values | Description |
---|---|---|
findPooledTaskInstances(String token) |
List<TaskInstance> |
Retrieves a list of pooled task instances assigned to the user. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.TaskInstance;
public class Test {
public static void main(String[] args) {
try {
// Get all user task intances
for (TaskInstance ti : OKMWorkflow.getInstance().findPooledTaskInstances(null)) {
System.out.println(ti);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
findTaskInstances
Description:
Method | Return values | Description |
---|---|---|
findTaskInstances(String token, long processInstanceId) |
List<TaskInstance> |
Retrieves a list of task instances by process intance. |
The parameter processInstanceId is a valid process instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.TaskInstance;
public class Test {
public static void main(String[] args) {
try {
// Get all user task intances
long piId = 8108; // Some valid process instance id
for (TaskInstance ti : OKMWorkflow.getInstance().findTaskInstances(null, piId)) {
System.out.println(ti);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
setTaskInstanceValues
Description:
Method | Return values | Description |
---|---|---|
setTaskInstanceValues(String token, long taskInstanceId, String transitionName, List<FormElement> values) |
void |
Set a task instance values. |
The parameter taskInstanceId is a valid task instance id. The parameter transitionName is the choosen transaction. The parameter values are form element values needed for starting the workflow ( not all workflow tasks need form values ). |
Example:
package com.openkm;
import java.util.ArrayList;
import java.util.List;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.form.FormElement;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
List<FormElement> feList = new ArrayList<>();
OKMWorkflow.getInstance().setTaskInstanceValues(null, tiId, "approve", feList);
} catch (Exception e) {
e.printStackTrace();
}
}
}
addTaskInstanceComment
Description:
Method | Return values | Description |
---|---|---|
addTaskInstanceComment(String token, long taskInstanceId, String message) |
void |
Set a task instance comment. |
The parameter taskInstanceId is a valid task instance id. |
Example:
package com.openkm;
import java.util.ArrayList;
import java.util.List;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().addTaskInstanceComment(null, tiId, "here the comment");
} catch (Exception e) {
e.printStackTrace();
}
}
}
getTaskInstance
Description:
Method | Return values | Description |
---|---|---|
getTaskInstance(String token, long taskInstanceId) |
TaskInstance |
Returns a task instance. |
The parameter taskInstanceId is a valid task instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.TaskInstance;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
TaskInstance ti = OKMWorkflow.getInstance().getTaskInstance(null, tiId);
System.out.println(ti);
} catch (Exception e) {
e.printStackTrace();
}
}
}
setTaskInstanceActorId
Description:
Method | Return values | Description |
---|---|---|
setTaskInstanceActorId(String token, long taskInstanceId, String actorId) |
void |
Set the actor to a task instance. |
The parameter taskInstanceId is a valid task instance id. The parameter actorId must be some valid OpenKM userId. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().setTaskInstanceActorId(null, tiId, "okmAdmin");
} catch (Exception e) {
e.printStackTrace();
}
}
}
addTaskInstanceVariable
Description:
Method | Return values | Description |
---|---|---|
addTaskInstanceVariable(String token, long taskInstanceId, String name, Object value) |
void |
Add variable into a task instance. |
The parameter taskInstanceId is a valid task instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().addTaskInstanceVariable(null, tiId, "key", "value");
} catch (Exception e) {
e.printStackTrace();
}
}
}
deleteTaskInstanceVariable
Description:
Method | Return values | Description |
---|---|---|
deleteTaskInstanceVariable(String token, long taskInstanceId, String name) |
void |
Delete variable from a task instance. |
The parameter taskInstanceId is a valid task instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().deleteTaskInstanceVariable(null, tiId, "key");
} catch (Exception e) {
e.printStackTrace();
}
}
}
startTaskInstance
Description:
Method | Return values | Description |
---|---|---|
startTaskInstance(String token, long taskInstanceId) |
void |
Starts a task instance. |
The parameter taskInstanceId is a valid task instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().startTaskInstance(null, tiId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
endTaskInstance
Description:
Method | Return values | Description |
---|---|---|
endTaskInstance(String token, long taskInstanceId, String transitionName) |
void |
Ends a task instance. |
The parameter taskInstanceId is a valid task instance id. The parameter transitionName is a transaction name. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().endTaskInstance(null, tiId, "end");
} catch (Exception e) {
e.printStackTrace();
}
}
}
suspendTaskInstance
Description:
Method | Return values | Description |
---|---|---|
suspendTaskInstance(String token, long taskInstanceId) |
void |
Suspend a task instance. |
The parameter taskInstanceId is a valid task instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().suspendTaskInstance(null, tiId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
resumeTaskInstance
Description:
Method | Return values | Description |
---|---|---|
resumeTaskInstance(String token, long taskInstanceId) |
void |
Resume a task instance. |
The parameter taskInstanceId is a valid task instance id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
public class Test {
public static void main(String[] args) {
try {
long tiId = 8110; // Some valid task instance id
OKMWorkflow.getInstance().resumeTaskInstance(null, tiId);
} catch (Exception e) {
e.printStackTrace();
}
}
}
getToken
Description:
Method | Return values | Description |
---|---|---|
getToken(String token, long tokenId) |
Token |
Return a token object. |
The parameter tokenId is a valid token id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.Token;
public class Test {
public static void main(String[] args) {
try {
long tkId = 8110; // Some valid token id
Token tk = OKMWorkflow.getInstance().getToken(null, tkId);
System.out.println(tk);
} catch (Exception e) {
e.printStackTrace();
}
}
}
addTokenComment
Description:
Method | Return values | Description |
---|---|---|
addTokenComment(String token, long tokenId, String message) |
void |
Add a token comment. |
The parameter tokenId is a valid token id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.Token;
public class Test {
public static void main(String[] args) {
try {
long tkId = 8110; // Some valid token id
Token tk = OKMWorkflow.getInstance().addTokenComment(null, tkId, "here the comment");
System.out.println(tk);
} catch (Exception e) {
e.printStackTrace();
}
}
}
suspendToken
Description:
Method | Return values | Description |
---|---|---|
suspendToken(String token, long tokenId) |
void |
Suspend a token. |
The parameter tokenId is a valid token id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.Token;
public class Test {
public static void main(String[] args) {
try {
long tkId = 8110; // Some valid token id
Token tk = OKMWorkflow.getInstance().suspendToken(null, tkId);
System.out.println(tk);
} catch (Exception e) {
e.printStackTrace();
}
}
}
resumeToken
Description:
Method | Return values | Description |
---|---|---|
resumeToken(String token, long tokenId) |
void |
Resume a token. |
The parameter tokenId is a valid token id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.Token;
public class Test {
public static void main(String[] args) {
try {
long tkId = 8110; // Some valid token id
Token tk = OKMWorkflow.getInstance().resumeToken(null, tkId);
System.out.println(tk);
} catch (Exception e) {
e.printStackTrace();
}
}
}
sendTokenSignal
Description:
Method | Return values | Description |
---|---|---|
sendTokenSignal(String token, long tokenId, String transitionName) |
Token |
Send a signal. |
The parameter tokenId is a valid token id. The parameter transitionName is a transaction name. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.Token;
public class Test {
public static void main(String[] args) {
try {
long tkId = 8110; // Some valid token id
Token tk = OKMWorkflow.getInstance().sendTokenSignal(null, tkId, "end");
System.out.println(tk);
} catch (Exception e) {
e.printStackTrace();
}
}
}
setTokenNode
Description:
Method | Return values | Description |
---|---|---|
setTokenNode(String token, long tokenId, String nodeName) |
void |
Set token node. |
The parameter tokenId is a valid token id. The parameter nodeName is a node name. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.Token;
public class Test {
public static void main(String[] args) {
try {
long tkId = 8110; // Some valid token id
OKMWorkflow.getInstance().setTokenNode(null, tkId, "formA");
} catch (Exception e) {
e.printStackTrace();
}
}
}
endToken
Description:
Method | Return values | Description |
---|---|---|
endToken(String token, long tokenId) |
Token |
End token. |
The parameter tokenId is a valid token id. |
Example:
package com.openkm;
import com.openkm.api.OKMWorkflow;
import com.openkm.bean.workflow.Token;
public class Test {
public static void main(String[] args) {
try {
long tkId = 8110; // Some valid token id
OKMWorkflow.getInstance().setTokenNode(null, tkId);
} catch (Exception e) {
e.printStackTrace();
}
}
}