camunda

Is there an easy way to find out if the process is waiting in a UserTask inside Delegation Code?

家住魔仙堡 提交于 2019-12-12 03:05:42
问题 This question is about the Camunda BPM engine. I would like to implement an ExecutionListener that I can attach to any process events. This listener should send process state messages to a message queue. The process message should contain a state that would be "PENDING" for the process if the process is waiting in a UserTask somewhere. Now I wonder if there is an easy way to find out if the process is waiting (somewhere) in a UserTask inside the Delegation Code (by using provided

camunda Cannot find task with id task is null

大憨熊 提交于 2019-12-12 02:32:08
问题 I'm beginner in Camunda. I would like to complete a task. So I start an instance by calling : http://localhost:8080/engine-rest/process-definition/key/approve-loan/submit-form via Postman and POST request with following data : { "variables": { "customerId": {"value":"Niall","type":"String"}, "amount":{"value":"100","type":"String"} } } and Content-Type : application/json I have the following output : { "links": [ { "method": "GET", "href": "http://localhost:8080/engine-rest/process-instance

Get form key from historic task

人盡茶涼 提交于 2019-12-11 13:55:39
问题 We get the form key from task service likes following snipped code for (Task task : getTaskService().createTaskQuery().taskCandidateGroupIn(candidateGroup).initializeFormKeys().list()) { task.getFormKey() .... .... ... } but now for some special reason we wanna get the form key value from HistoricTaskInstance, and we try several ways to get it but all of them fail. We are wondering that how we can get the form key value from completed task? 回答1: The form key is not available for historic

Debugging a Javascript within Camunda's Script-Task

ⅰ亾dé卋堺 提交于 2019-12-11 12:45:16
问题 I'm trying to merge two arrays in a Script Task of type Javascript within a Process in Camunda . Here's my script: var arr1 = execution.getVariableTyped("arr1", true); var arr2 = execution.getVariableTyped("arr2", true); var merged = []; for (var i1 in arr1) { var found = false; for (var i2 in merged) { if (arr1[i1].id == merged[i2].id) { found = true; break; } } if (!found) { merged.push(arr1[i1]); } } for (var i1 in arr2) { var found = false; for (var i2 in merged) { if (arr2[i1].id ==

No process engine found. camunda Webapp cannot work without a process engine

左心房为你撑大大i 提交于 2019-12-11 06:55:33
问题 When I set up a camunda BPMN platform, I got the following error HTTP Status 500 - org.camunda.bpm.webapp.impl.IllegalWebAppConfigurationException: No process engine found. camunda Webapp cannot work without a process engine Confirming that the both the '/camunda' and '/engine-rest' is deployed and running in Tomcat. But /engine-rest returns 404 with following error. description : The requested resource is not available. Please help!. 回答1: You need to configure the shared process engine for

Own process instance can not be found inside a ServiceTask execution

落爺英雄遲暮 提交于 2019-12-11 01:54:36
问题 I have implemented a Camunda ServiceTask class (JavaDelegate) right after the start of my process. In this task I run a ProcessInstanceQuery for the own process instance (don't ask why). Surprisingly the query result is null - and I do not understand how this can happen. To reproduce the problem I created a very simple demo project at GitHub. This is the process and this is my HelloWorldTask execution code @Override public void execute(DelegateExecution execution) throws Exception { String

How to setup conditionals for BPMN2 Exclusive Gateway

微笑、不失礼 提交于 2019-12-10 17:18:16
问题 I'm using Camunda BPMN2 for the first time in my spring project and trying to get my head around a couple of things ... In my applicationContext, I have the following block to setup Camunda: <!-- Setup BPMN Process Engine --> <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration"> <property name="processEngineName" value="engine" /> <property name="dataSource" ref="dataSource" /> <property name="transactionManager" ref="transactionManager"

How to query the position of a process instance?

你。 提交于 2019-12-06 09:35:07
问题 I want to get the current position of a single instance in my process. Is it possible to get the name of the activity additionaly to the id as return value? 回答1: You can get the current position of your process instance using the following code, which will also give you the name of the activity(ies) when the process waits in multiple position. package org.camunda.bpm; import java.util.HashMap; import java.util.List; import java.util.Map; import org.camunda.bpm.engine.ProcessEngine; import org

Camunda BPMN - Task listener vs Execution listeners

丶灬走出姿态 提交于 2019-12-06 01:35:41
问题 I've been using Camunda BPMN 2.0 for one of my workflow applications. In one of my service tasks, I created an execution listener at the start event and a task listener at the create event. I'm not sure whether it's proper to assign these simultaneously at the start event. If it's correct, which one of them will be getting executed first - Execution listener or Task Listener, at start or create event, respectively ? 回答1: Task listeners can only be used with user tasks, since they provide

How to specify which start event should be called from a BPMN callActivity

依然范特西╮ 提交于 2019-12-05 18:42:49
From http://www.omg.org/spec/BPMN/2.0.2/PDF on page 238: If the Process is used as a global Process (a callable Process that can be invoked from Call Activities of other Processes) and there are multiple None Start Events, then when flow is transferred from the parent Process to the global Process, only one of the global Process’s Start Events will be triggered. The targetRef attribute of a Sequence Flow incoming to the Call Activity object can be extended to identify the appropriate Start Event. How does one go about extending the targetRef attribute? Doesn't it have to be a valid IDREF?