bonitasoft
[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]
Last updated: 25th Jan, 2025 Have you ever wondered how to seamlessly integrate the vast…
Hey there! As I venture into building agentic MEAN apps with LangChain.js, I wanted to…
Software-as-a-Service (SaaS) providers have long relied on traditional chatbot solutions like AWS Lex and Google…
Retrieval-Augmented Generation (RAG) is an innovative generative AI method that combines retrieval-based search with large…
The combination of Retrieval-Augmented Generation (RAG) and powerful language models enables the development of sophisticated…
Have you ever wondered how to use OpenAI APIs to create custom chatbots? With advancements…