setup multiInstanceLoopCharacteristics for Multi-Instance Service Task

1,322 views
Skip to first unread message

Jürgen Krauß

unread,
Dec 12, 2016, 11:19:11 AM12/12/16
to jBPM Usage
Hello,
i'm trying to run a simple process with an start-event, followed by a service task, followed and finished by an end-event. The service task should start a method in a java class which works perfectly nice if i want to run it just one time. Now i want to change the service task into multi-instance to run it several times... 

I think the correct apporach for this is to set up a integer expression... I tried a lot of different things like

${com.sample.ProcessMain.getList}   - to get a list from a javacode
${5}  - to get a integer expression?
${return 5}   - to return a integer expression?

I tried even to code some loops and other code as expression... However it makes no difference, when i deploy the KIE Workbench just tells me this:

2016-12-12 16:48:31,600 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (EJB default - 2) Unable to build KieBaseModel:base
[-1,-1]: Process 'Hello World' [com.sample.bpmn.hello]: Node 'null' [3] ForEach has no variable name
[-1,-1]: Process 'Hello World' [com.sample.bpmn.hello]: Node 'null' [3] ForEach has no collection expression

I assume this error occurs before the engine can even check me expression... I'm not able to find any documentation to this. I don't know what a collection expression and variable name is. I can't find any field to fill in this information in the eclipse modeler.  In camunda and activity for example there is a field for "LoopCardinality". If i put in a five the service task runs five times. 

Can anyone help me to run this please?

Greetings 
J. Krauß

Bernhard Benuli

unread,
Dec 13, 2016, 3:45:15 AM12/13/16
to jBPM Usage
for using Multiinstance Subprocess you should take a look at this blog entry:
Bernhard
Message has been deleted

Jürgen Krauß

unread,
Dec 15, 2016, 10:35:30 AM12/15/16
to jBPM Usage
Thx for your reply. I already red this blog entry.
I think that's not what want because it's to much. I don't want to set up and maintain a collection to iterate over it. I just want the easiest way to say my task to run my Java Implementation multiple times. I have no dependency on data on process level. All data are organized in java code.
Is there no simpler approach? What's that about the Integer Expression? 

I try to generate "fake" collection as a workaround just because it seems it need a collection. However more input about this topic would be nice because this approach feels kind of strange. 

Greetings 
J. Krauß

Donato Marrazzo

unread,
Dec 16, 2016, 6:37:17 AM12/16/16
to jBPM Usage


On Thursday, December 15, 2016 at 4:35:30 PM UTC+1, Jürgen Krauß wrote:
Thx for your reply. I already red this blog entry.
I think that's not what want because it's to much. I don't want to set up and maintain a collection to iterate over it. I just want the easiest way to say my task to run my Java Implementation multiple times. I have no dependency on data on process level. All data are organized in java code.
Is there no simpler approach? What's that about the Integer Expression? 
In order to manage the process logic, the process MUST handle process data: your BPM kjar can import your java model as a dependency.
Look at this sample:
HTH, Donato
 

Jürgen Krauß

unread,
Dec 16, 2016, 7:38:22 AM12/16/16
to jBPM Usage
Thank you for this link. I saw something like that before. Maybe this can solve my problem. But i don't know how i get access to kcontext in java code. Every example i red start with something like "kcontect.". Where is it initialized?

Donato Marrazzo

unread,
Dec 16, 2016, 7:48:00 AM12/16/16
to jBPM Usage
There is also a predefined variable kcontext that references the ProcessContext object (which can, for example, be used to access the current ProcessInstance or NodeInstance, and to get and set variables, or get access to the ksession using kcontext.getKnowledgeRuntime())


Cheers, Donato

Jürgen Krauß

unread,
Dec 16, 2016, 8:24:01 AM12/16/16
to jBPM Usage
In my project i have a ProcessMain.class which holds (I tried to get kcontext from all of this, couldn't find ist):
  • KieService
  • KieContainer
  • KieBase
  • RuntimeManage
  • RuntimeEngine
  • KieSession
In this class i start the process. My service task in process just executes a plain java method. I've attached a screenshot from eclipse modeller. If i have to use kcontext to predefine variabled for the multitask i would like to do it in this play java method. Therefore i have to get the instance of this predefined variable. Something like "= getKcontext", or am i totally wrong?
2016-12-16 14_19_36-workspace - jBPM - MultiTest_src_main_resources_com_sample_New Process.bpmn2 - E.png

Jürgen Krauß

unread,
Dec 16, 2016, 8:27:15 AM12/16/16
to jBPM Usage
System.out.println("init " + list);

list = new java.util.ArrayList<String>();
list.add("str1");
list.add("str2");
list.add("str3");

kcontext.setVariable("list",list);


So the question is: Where does this code belong to?


Jürgen Krauß

unread,
Jan 13, 2017, 8:50:20 AM1/13/17
to jBPM Usage
I have to come up with this problem again... I tried now to just work with a simple list and forget the mutli-instance for a second. 


According to this link i set up a ArrayList named list. 

This code i put in a script task
list = new java.util.ArrayList<String>();
list.add("str1");
list.add("str2");
list.add("str3");

kcontext.setVariable("list",list);

After all if i run the process with just this script task i get a error message:
2017-01-13 14:44:15,282 ERROR [org.guvnor.common.services.backend.exceptions.ExceptionUtilities] (default task-7) Exception thrown: [defaultPackage.New_Process:90 - Script Task 1:2] -- [Error: could not resolve class: java.util.ArrayList<String>]
[Near : {...  ....}]
             ^
[Line: 3, Column: 12]: org.jbpm.workflow.instance.WorkflowRuntimeException: [defaultPackage.New_Process:90 - Script Task 1:2] -- [Error: could not resolve class: java.util.ArrayList<String>]
[Near : {...  ....}]
             ^
[Line: 3, Column: 12]
	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:206)
	at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:48)
	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173)
	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:366)
	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:325)
	at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:73)
	at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:44)
	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173)
	at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
	at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:236)
	at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:449)
	at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:206)
	at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:215)
	at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:223)
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:1920)
	at org.drools.core.command.runtime.process.StartCorrelatedProcessCommand.execute(StartCorrelatedProcessCommand.java:146)
	at org.drools.core.command.runtime.process.StartCorrelatedProcessCommand.execute(StartCorrelatedProcessCommand.java:44)
	at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
	at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)
	at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:604)
	at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)
	at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:82)
	at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)
	at org.drools.persistence.jta.TransactionLockInterceptor.execute(TransactionLockInterceptor.java:73)
	at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:397)
	at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:559)
	at org.jbpm.kie.services.impl.ProcessServiceImpl.startProcess(ProcessServiceImpl.java:126)
	at org.jbpm.services.cdi.impl.ProcessServiceCDIImpl$Proxy$_$$_WeldClientProxy.startProcess(Unknown Source)
	at org.jbpm.console.ng.bd.backend.server.KieSessionEntryPointImpl.startProcess(KieSessionEntryPointImpl.java:78)
	at org.jbpm.console.ng.bd.backend.server.KieSessionEntryPointImpl$Proxy$_$$_WeldClientProxy.startProcess(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48)
	at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22)
	at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)
	at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:410)
	at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47)
	at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:296)
	at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97)
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114)
	at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:69)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:57)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: [Error: could not resolve class: java.util.ArrayList<String>]
[Near : {...  ....}]
             ^
[Line: 3, Column: 12]
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeObjectCreation(ReflectiveAccessorOptimizer.java:1242)
	at org.mvel2.ast.NewObjectNode.getReducedValueAccelerated(NewObjectNode.java:218)
	at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
	at org.mvel2.ast.AssignmentNode.getReducedValueAccelerated(AssignmentNode.java:116)
	at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
	at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
	at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
	at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:113)
	at org.mvel2.MVEL.executeExpression(MVEL.java:929)
	at org.drools.core.util.MVELSafeHelper$RawMVELEvaluator.executeExpression(MVELSafeHelper.java:496)
	at org.jbpm.process.instance.impl.MVELAction.execute(MVELAction.java:114)
	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:200)
	... 83 more
Caused by: java.lang.ClassNotFoundException: java.util.ArrayList<String>
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:348)
	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.mvel2.util.ParseTools.createClass(ParseTools.java:510)
	at org.mvel2.util.ParseTools.findClass(ParseTools.java:926)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileConstructor(ReflectiveAccessorOptimizer.java:1272)
	at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeObjectCreation(ReflectiveAccessorOptimizer.java:1236)
	... 94 more

It seems that the runtime engine cannot resolve to the ArrayList. Do i have to set imports somewhere? 

Thanks for your help.

Jürgen Krauß

unread,
Jan 13, 2017, 8:58:05 AM1/13/17
to jBPM Usage
In the attached file you can see my import aswell as in the xml: 


<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:java="http://www.java.com/javaTypes" xmlns:tns="http://www.jboss.org/drools" xmlns="http://www.jboss.org/drools" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd" id="Definition" exporter="org.eclipse.bpmn2.modeler.core" exporterVersion="1.3.1.Final-v20161006-1425-B58" expressionLanguage="http://www.mvel.org/2.0" targetNamespace="http://www.jboss.org/drools" typeLanguage="http://www.java.com/javaTypes">
  <bpmn2:itemDefinition id="ItemDefinition_51" isCollection="false" structureRef="java.util.ArrayList"/>
  <bpmn2:process id="defaultPackage.New_Process" tns:packageName="defaultPackage" name="New Process" isExecutable="true" processType="Private">
    <bpmn2:extensionElements>
      <tns:import name="java.util.ArrayList"/>
    </bpmn2:extensionElements>
    <bpmn2:property id="list" itemSubjectRef="ItemDefinition_51" name="list"/>
    <bpmn2:startEvent id="StartEvent_1" name="StartProcess">
      <bpmn2:extensionElements>
        <tns:metaData name="elementname">
          <tns:metaValue><![CDATA[StartProcess]]></tns:metaValue>
        </tns:metaData>
      </bpmn2:extensionElements>
      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:scriptTask id="ScriptTask_1" name="Script Task 1">
      <bpmn2:extensionElements>
        <tns:metaData name="elementname">
          <tns:metaValue><![CDATA[Script Task 1]]></tns:metaValue>
        </tns:metaData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
      <bpmn2:script>System.out.println(&quot;init &quot;);

list = new java.util.ArrayList&lt;String>();
list.add(&quot;str1&quot;);
list.add(&quot;str2&quot;);
list.add(&quot;str3&quot;);

kcontext.setVariable(&quot;list&quot;,list);</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:endEvent id="EndEvent_1" name="End Event 1">
      <bpmn2:extensionElements>
        <tns:metaData name="elementname">
          <tns:metaValue><![CDATA[End Event 1]]></tns:metaValue>
        </tns:metaData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_1" tns:priority="1" sourceRef="StartEvent_1" targetRef="ScriptTask_1"/>
    <bpmn2:sequenceFlow id="SequenceFlow_2" tns:priority="1" sourceRef="ScriptTask_1" targetRef="EndEvent_1"/>
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_Process_1" bpmnElement="defaultPackage.New_Process">
      <bpmndi:BPMNShape id="BPMNShape_StartEvent_1" bpmnElement="StartEvent_1">
        <dc:Bounds height="0.0" width="0.0" x="45.0" y="45.0"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds height="15.0" width="71.0" x="28.0" y="81.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_ScriptTask_1" bpmnElement="ScriptTask_1" isExpanded="true">
        <dc:Bounds height="50.0" width="110.0" x="135.0" y="25.0"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds height="15.0" width="71.0" x="154.0" y="42.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_EndEvent_1" bpmnElement="EndEvent_1">
        <dc:Bounds height="36.0" width="36.0" x="282.0" y="32.0"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds height="15.0" width="65.0" x="268.0" y="68.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_StartEvent_1" targetElement="BPMNShape_ScriptTask_1">
        <di:waypoint xsi:type="dc:Point" x="81.0" y="63.0"/>
        <di:waypoint xsi:type="dc:Point" x="108.0" y="63.0"/>
        <di:waypoint xsi:type="dc:Point" x="108.0" y="50.0"/>
        <di:waypoint xsi:type="dc:Point" x="135.0" y="50.0"/>
        <bpmndi:BPMNLabel/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_ScriptTask_1" targetElement="BPMNShape_EndEvent_1">
        <di:waypoint xsi:type="dc:Point" x="245.0" y="50.0"/>
        <di:waypoint xsi:type="dc:Point" x="263.0" y="50.0"/>
        <di:waypoint xsi:type="dc:Point" x="282.0" y="50.0"/>
        <bpmndi:BPMNLabel/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>
2017-01-13 14_56_36-workspace - jBPM - variableTest_src_main_resources_com_sample_New Process.bpmn2 .png

Donato Marrazzo

unread,
Jan 13, 2017, 9:59:41 AM1/13/17
to jBPM Usage
Hello, 

you have to define list as process variable.

You can find in the KieWorkbench here:
BPMN Diagram > Properties > Variable Definition

Click Add Variable and fill in:
Name: list
Custom type: java.util.ArrayList

Jürgen Krauß

unread,
Jan 13, 2017, 1:47:39 PM1/13/17
to jBPM Usage
Hm. Ok. I work on my process in eclipse. If i want to test it, i build it with maven, start the KIE Workbench, click on Deploy --> Process Deployments --> New Deployment Unit --> Fill in my information from the pom.xml --> go to Process Definition in Process Managment and start the process.

I saw already, that there is a way to work on processes with the Authoring tab. However i have no clue how i can open my process which i deployed on the way i described. There is just a demo repository with the evalutation process. Isn't it possible to do all the programming in eclipse?

Donato Marrazzo

unread,
Jan 15, 2017, 6:52:15 AM1/15/17
to jBPM Usage
You can edit the process using "BPMN2 Process Editor" in eclipse, but the web editor is better suited because is tailored by the jBPM team to design jBPM processes, while the eclipse editor is more general purpose and it could lead to some incoherence.
The important thing is never to mix the 2 editors because it will lead for sure breaking the model!
You can use the eclipse editor for all Java assets and the web editor just for the bpmn editor and the deployment descriptors (it's my usual method).
To exchange the assets between eclipse and the workbench (business central), you have to point from eclipse the internal git repo in the workbench.
I suggest you to read the documentation. At least the getting started guide where you'll find a section on this topic named "Cloning Remote Git Repository"
To edit the variables in the eclipse editor:
1) Open "BPMN2 Process Editor"
2) Click in the white space of the process (no process tasks)
3) In the property view, edit the "variables" properties.
Reply all
Reply to author
Forward
0 new messages