[adsenseyu2]
Following are key source code blocks/classes/APIs to consider for you to get started with Bonita REST API implementation:
ProcessDefinitionUUID processDefinitionUUID = new ProcessDefinitionUUID(process, version); try { return runtimeAPI.instantiateProcess(processDefinitionUUID, params); } catch (ProcessNotFoundException e) { } catch (VariableNotFoundException e) { }
Following is the source code representing usage of above methods to create a task:
public void createTask(final String taskId, final Map<String, Object> taskVariables) { ActivityInstanceUUID activityUUID = new ActivityInstanceUUID(taskId); ProcessInstanceUUID processUUID; runtimeAPI = AccessorUtil.getRuntimeAPI(); queryRuntimeAPI = AccessorUtil.getQueryRuntimeAPI(); try { processUUID = queryRuntimeAPI.getLightTaskInstance(activityUUID).getProcessInstanceUUID(); LightProcessInstance lpInstance = queryRuntimeAPI.getLightProcessInstance(processUUID); runtimeAPI.startTask(activityUUID, true); runtimeAPI.setProcessInstanceVariables(lpInstance.getProcessInstanceUUID(), taskVariables); runtimeAPI.finishTask(activityUUID, true); } catch (TaskNotFoundException e) { } catch (InstanceNotFoundException e) { } catch (IllegalTaskStateException e) { } catch (VariableNotFoundException e) { } }
public LightTaskInstance getTask(final String taskId) { ActivityInstanceUUID activityInstanceUUID = new ActivityInstanceUUID(taskId); try { return queryRuntimeAPI.getLightTaskInstance(activityInstanceUUID); } catch (TaskNotFoundException e) { } return null; }
[adsenseyu1]
In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…
Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…
With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…
Anxiety is a common mental health condition that affects millions of people around the world.…
In machine learning, confounder features or variables can significantly affect the accuracy and validity of…
Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…