Code Monkey home page Code Monkey logo

bpmn-server's People

Contributors

dependabot[bot] avatar kstan79 avatar linonetwo avatar ralphhanna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bpmn-server's Issues

How to add a new feature

I want to add a new feature, say user authentication by username and password. I will be maintaining a new collection with user credentials in the mongodb. Now if I want to expose an API to do so, and handle the business logic behind it, how to approach that?
Have tried adding a new route right under /restart at WebApp/routes/index.ts but was not able call it as it is throwing 404.

Please advice.
@ralphhanna

`messageMatchingKey` when throwing messages & `id` config

1:

What's the importance of messageMatchingKey when throwing or catching message events? Does the message event won't work without this?

In the doc, I can see that you have mentioned

However, the challenge here is that make sure the message is sent to the specific instance, that is where the Matching key is used

Is the messageRef (Message Id) not sufficient enough to target the specific instance?

2:

One issue when using modeller,
For signal and message events, we generally use the same id (signalRef or messageRef in BPMN) for the throw and catch events.
The message/signal id is not editable. We can add a new one or choose from a list but there is no option to edit.
This is not a problem when configuring ids in one process or its sub processes.
But it becomes a problem, when I want to use the same id for a separate processes (different BPMN file). In such case, I manually edited the BPMN files for the ids to match.

In your example processes, msgThrow and MsgCatch, I see that you have matching ids; how did you configure them without having to edit the file directly.

Thanks!

Deleting instances via API

Using 1.3.1

I'm trying to delete instances using API.

It seems to be missing an appropriate API call in bpmn-client.

Thanks!

How to Make Process Asynchronous

With a long running process such as:

iscout-web-platinum

What's the best method for making parts or all of it asynchronous? In camunda, you could mark a node as asynchronous before or after, which would result in the execution returning immediately. Thus freeing up resources to continue operating. I see User Tasks and Boundary Events seem to do this in bpmn-server per a few tests I've read through and go into a waiting state. What I'd like to achieve is to hand the process off to a worker thread of sorts and just return the immediate execution instance. Hopefully, I'm describing that well enough.

I definitely don't want the whole process to finish before await server.engine.start(name, data) returns.

License

Can you please add a license , since from my understanding according to GitHub if project is without a license it can not be used

Request to update dependencies

Hi @ralphhanna,

This is a request. Since the dependencies' versions varies a lot as of now, npm i shows some vulnerabilties. Could I kindly request you to update those?

I could update them locally but not sure what would I break if I do. Thought it would be better coming from you.

Thank you!

Installation

I'm trying to use v1.3.4

When I was following the installation instructions to pull v1.3.4, strangely npm install after copying WebApp changes the server to v1.3.1.

I see that the package.json inside WebApp has >=1.2.0. So keeping 1.3.4 shoudn't be a problem right?

This just drove me crazy this morning ๐Ÿ˜… ๐Ÿ˜. Sorry!
I just manually changed them to 1.3.4 on my side and carried on working.

Why is this issue?

Thanks!

Rebuilding processes from client side

Hi @ralphhanna,

Is there a way to rebuild processes without having to restart the server itself?

Suppose I am writing a new BPMN file to the processes folder externally not through your web app, I would like to rebuild the processes without having to restart the server itself.

Is it possible to trigger the rebuild from bpmn-client API? If not, it would be convenient to have this feature,

Thanks.

How to call external JS Script?

Hi,

Thank you for the great software package you put together,

I have been searching the forum and could not find any information in this regard. Is it possible for a Task defined in the modeller interface to call an external JS/NodeJS script ? As I see now it is possible to define only an inline script when setting the execution listener/input parameters/output parameters to type Script โ†’ Script Format JavaScript. But we would like for the activity to execute an external script.

Is there any possible way of doing this (without too much coding or a reasonable amount of coding) ?

Thank you

WebApp Customizations

Hi @ralphhanna,

Could you please advice on the below customizations in the webapp?

  1. Is it possible to restrict or hide BPMN elements from the modelling canvas? For example, consider we are never going to use the elements "Intermediate message throw and catch"; so we would like to hide those elements from the modelling canvas to avoid confusion with users.

  2. Is it possible to modify field types of the properties panel elements? For example, we know that the users should provide an delegate expression for service tasks. Suppose the user misspells the implementation name or leaves it empty, the engine would ignore that service while execution. To avoid this, I would like to make the field "Delegate Expression" as a Dropdown field instead of thee default text field, so that user can choose the service from a predefined list.

What do you think of implementing such customizations and the effort in doing so?

Thanks!

Error handling for `import` in `bpmn-client`

Hi @ralphhanna

Could you please check the error handling for the server.definitions.import in bpmn-client?

Consider my below code.

const { BPMNClient } = require('bpmn-client');
const path = require('path');

const testfn = async () => {
    try{
        const bpmnServer = new BPMNClient(
            '127.0.0.1',
            3000,
           12345,
        );

        const importResult = await bpmnServer.definitions.import(
            'dummyTest',
            path.resolve('README.md'),
        );

        return 'done';
    } catch(err){
        throw err;
    }
}
testfn().then( res => {
    console.log('Caught Res:', res);
}).catch( err => {
    console.log('Caught ERR:', err.message);
});

Suppose the bpmn-server is not running. And when I run the above code, I expect the errors to be caught properly. Instead it abruptly terminates the script logging the error in console without proper catching.

Please look into this?

On an unrelated note, Please add vars attribute to the interface DataObjects.ts in bpmn-client as well.

Error on `build`

Description:
Error when compiling the code when running build or compileRun in version 1.3.0

Expected behaviour:
Build completes without any error

Actual behaviour:
Error in build

Console Error:

routes/api.ts:139:42 - error TS2339: Property 'getRemoteUser' does not exist on type 'IIAM'.

139                 userKey = bpmnServer.iam.getRemoteUser(userId);
                                             ~~~~~~~~~~~~~

routes/api.ts:174:42 - error TS2339: Property 'getRemoteUser' does not exist on type 'IIAM'.

174                 userKey = bpmnServer.iam.getRemoteUser(userId);
                                             ~~~~~~~~~~~~~

routes/api.ts:176:78 - error TS2554: Expected 1-3 arguments, but got 4.

176                 context = await bpmnServer.engine.invoke(query, data,userKey,options );
                                                                                 ~~~~~~~


Found 3 errors.

Edit:

After this, I tried npm update & copied files; and then I tried build which got me the below errors:

Console Error:


node_modules/bpmn-server/src/datastore/DataStore.ts:329:9 - error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.

329     if (match == {})
            ~~~~~~~~~~~

node_modules/bpmn-server/src/elements/behaviours/IOBehaviour.ts:47:13 - error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.

47         if (data !== {})
               ~~~~~~~~~~~

node_modules/bpmn-server/src/elements/behaviours/IOBehaviour.ts:71:13 - error TS2839: This condition will always return 'true' since JavaScript compares objects by reference, not value.

71         if (data !== {})
               ~~~~~~~~~~~

node_modules/bpmn-server/src/elements/Node.ts:87:13 - error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.

87         if (item.context.output == {} )
               ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/bpmn-server/src/datastore/ModelsDatastore.ts:120:17 - error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value.

120             if (match == {})
                    ~~~~~~~~~~~

Found 5 errors.

Issue in creating a new model using WebApp

Description:
Error when trying to create a new model using the WebApp,

Steps to Reproduce:

  1. Open the webapp
  2. Click "New Model"
  3. Give a service name
  4. Click "Submit"
  5. See the error in console

Expected behaviour:
Allow me to create a new model and save it

Console Error:

node:fs:599
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'F:\Programming\Test-BPMN-Server/processes/testServiceOptions.bpmn'
    at Object.openSync (node:fs:599:3)
    at Object.readFileSync (node:fs:467:35)
    at ModelsDatastore.getFile (F:\Programming\Test-BPMN-Server\node_modules\bpmn-server\dist\src\datastore\ModelsDatastore.js:246:23)
    at ModelsDatastore.<anonymous> (F:\Programming\Test-BPMN-Server\node_modules\bpmn-server\dist\src\datastore\ModelsDatastore.js:259:25)
    at Generator.next (<anonymous>)
    at F:\Programming\Test-BPMN-Server\node_modules\bpmn-server\dist\src\datastore\ModelsDatastore.js:9:71
    at new Promise (<anonymous>)
    at __awaiter (F:\Programming\Test-BPMN-Server\node_modules\bpmn-server\dist\src\datastore\ModelsDatastore.js:5:12)
    at ModelsDatastore.getSource (F:\Programming\Test-BPMN-Server\node_modules\bpmn-server\dist\src\datastore\ModelsDatastore.js:258:16)
    at Modeller.<anonymous> (F:\Programming\Test-BPMN-Server\views\Modeller.js:22:37) {
  errno: -4058,
  syscall: 'open',
  code: 'ENOENT',
  path: 'F:\\Programming\\Test-BPMN-Server/processes/testServiceOptions.bpmn'
}

P.S: Tested in the demo site as well

Issue with `vars` in items

Hi @ralphhanna

I have a workflow like below,
image

There is a receive task which has an input parameter.

Now, I have a running instance for the above workflow which is waiting at the Receive task:

image

But the vars is empty, when I use server.datastore.findItems({ 'items.status': 'wait', 'items.type': 'bpmn:ReceiveTask', })

image

Could you please look into this? Thanks

Process Modeller

Hi,

The process modeller that comes with bpmn-server is handy and it's useful in storing the processes directly to DB without hassle.

Let's consider your example Buy Used Car process has some gateways and conditional expressions to regulate the sequential flow. But the inherent process modeller doesn't have features to configure expressions or properties.
So, am I correct in understanding that you designed your processes using a different modeller not the inherent one?
If so, what utility/tool did you use to model all your processes along with configurations?

Thanks!

Documentation

Honestly, most of my questions will probably come out of the lack of documentation/examples. I'm sure you are working on it, as this is a newer project. You referred me over here from an issue on bpmn-engine project, in which you said bpmn-server handled most of my questions. I'm sure it does, but it's not immediately intuitive as to how.

  • timer start events (cron): how do load a process that should run every minute? Do you support the cron expression below or do you require the ISO standard syntax i.e., R3/P1H etc?

just-log-it

    <bpmn:startEvent id="START_TIMER_CYCLE" name="Every 5 Min on the Hour">
      <bpmn:outgoing>Flow_0u4ajec</bpmn:outgoing>
      <bpmn:timerEventDefinition id="TimerEventDefinition_1sge2cd">
        <bpmn:timeCycle xsi:type="bpmn:tFormalExpression">0 0/1 * * * ?</bpmn:timeCycle>
      </bpmn:timerEventDefinition>
    </bpmn:startEvent>
  • services: I see the app delegate seems to be the way to add functions for service calls. Is that referenced properly in expressions too? i.e., ${justLogIt} It works for implementation="justLogIt". Furthermore, do you support the camunda namespace behaviours? I.e., camunda:expression, etc?
    <bpmn:serviceTask id="JUST_LOG_IT" name="Just Log It" implementation="justLogIt" camunda:expression="${justLogIt}">
      <bpmn:incoming>Flow_0u4ajec</bpmn:incoming>
      <bpmn:outgoing>Flow_1alh6yw</bpmn:outgoing>
    </bpmn:serviceTask>

Issues with Send & Receive Tasks, Boundary events and Timer Cycles.

Using 1.3.8

I'm using the below example to test Send & Receive Tasks.

image

A) Interrupting boundary event - Timer Duration
B) Non-Interrupting boundary event - Timer Cycle

BPMN File
<?xml version="1.0" encoding="UTF-8"?>
<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:camunda="http://camunda.org/schema/1.0/bpmn" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn2:message id="Message_1c5ag87" name=" TestReceiveMsg" />
  <bpmn2:collaboration id="Collaboration_1scj0fl">
    <bpmn2:participant id="Participant_0murubu" processRef="Process_1" />
  </bpmn2:collaboration>
  <bpmn2:process id="Process_1" isExecutable="false">
    <bpmn2:startEvent id="StartEvent_1" name="Start">
      <bpmn2:outgoing>Flow_1vbusiz</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:userTask id="Activity_1wzqauq" name="Get Data">
      <bpmn2:extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="Name" />
          <camunda:outputParameter name="Age" />
        </camunda:inputOutput>
      </bpmn2:extensionElements>
      <bpmn2:incoming>Flow_1vbusiz</bpmn2:incoming>
      <bpmn2:outgoing>Flow_049jnj8</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:receiveTask id="Activity_0lijns0" name="Receive" messageRef="Message_1c5ag87">
      <bpmn2:incoming>Flow_049jnj8</bpmn2:incoming>
      <bpmn2:outgoing>Flow_1k69s2j</bpmn2:outgoing>
    </bpmn2:receiveTask>
    <bpmn2:endEvent id="Event_0rhzt3f" name="End">
      <bpmn2:incoming>Flow_0nsp97x</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:serviceTask id="Activity_1gca7eg" name="Dummy" camunda:delegateExpression="dummyService">
      <bpmn2:incoming>Flow_1k69s2j</bpmn2:incoming>
      <bpmn2:outgoing>Flow_0nsp97x</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:boundaryEvent id="Event_0khrsn8" attachedToRef="Activity_0lijns0">
      <bpmn2:outgoing>Flow_00j2800</bpmn2:outgoing>
      <bpmn2:timerEventDefinition id="TimerEventDefinition_0zj43lm">
        <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">PT1M</bpmn2:timeDuration>
      </bpmn2:timerEventDefinition>
    </bpmn2:boundaryEvent>
    <bpmn2:boundaryEvent id="Event_1jmzrm3" cancelActivity="false" attachedToRef="Activity_0lijns0">
      <bpmn2:outgoing>Flow_0qrn6iu</bpmn2:outgoing>
      <bpmn2:timerEventDefinition id="TimerEventDefinition_1gkftm0">
        <bpmn2:timeCycle xsi:type="bpmn2:tFormalExpression">R5/PT15S</bpmn2:timeCycle>
      </bpmn2:timerEventDefinition>
    </bpmn2:boundaryEvent>
    <bpmn2:sequenceFlow id="Flow_00j2800" sourceRef="Event_0khrsn8" targetRef="Activity_1p4flr2" />
    <bpmn2:sequenceFlow id="Flow_0qrn6iu" sourceRef="Event_1jmzrm3" targetRef="Activity_0k9j60h" />
    <bpmn2:sequenceFlow id="Flow_0nsp97x" sourceRef="Activity_1gca7eg" targetRef="Event_0rhzt3f" />
    <bpmn2:sequenceFlow id="Flow_1k69s2j" sourceRef="Activity_0lijns0" targetRef="Activity_1gca7eg" />
    <bpmn2:sequenceFlow id="Flow_049jnj8" sourceRef="Activity_1wzqauq" targetRef="Activity_0lijns0" />
    <bpmn2:sequenceFlow id="Flow_1vbusiz" sourceRef="StartEvent_1" targetRef="Activity_1wzqauq" />
    <bpmn2:serviceTask id="Activity_1p4flr2" name="Expired" camunda:delegateExpression="expiredService">
      <bpmn2:incoming>Flow_00j2800</bpmn2:incoming>
    </bpmn2:serviceTask>
    <bpmn2:sendTask id="Activity_0k9j60h" name="Notify" camunda:delegateExpression="notifyService">
      <bpmn2:incoming>Flow_0qrn6iu</bpmn2:incoming>
    </bpmn2:sendTask>
    <bpmn2:textAnnotation id="TextAnnotation_1ufv7fx">
      <bpmn2:text>After 1 min (PT1M)</bpmn2:text>
    </bpmn2:textAnnotation>
    <bpmn2:association id="Association_18y900z" sourceRef="Event_0khrsn8" targetRef="TextAnnotation_1ufv7fx" />
    <bpmn2:textAnnotation id="TextAnnotation_0aa6r3m">
      <bpmn2:text>Every 15 sec upto 5 times (R5/PT15S)</bpmn2:text>
    </bpmn2:textAnnotation>
    <bpmn2:association id="Association_1gbeptk" sourceRef="Event_1jmzrm3" targetRef="TextAnnotation_0aa6r3m" />
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1scj0fl">
      <bpmndi:BPMNShape id="Participant_0murubu_di" bpmnElement="Participant_0murubu" isHorizontal="true">
        <dc:Bounds x="220" y="80" width="1010" height="310" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="TextAnnotation_1ufv7fx_di" bpmnElement="TextAnnotation_1ufv7fx">
        <dc:Bounds x="530" y="257" width="100" height="41" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="TextAnnotation_0aa6r3m_di" bpmnElement="TextAnnotation_0aa6r3m">
        <dc:Bounds x="780" y="250" width="100" height="55" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1vbusiz_di" bpmnElement="Flow_1vbusiz">
        <di:waypoint x="308" y="200" />
        <di:waypoint x="440" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_049jnj8_di" bpmnElement="Flow_049jnj8">
        <di:waypoint x="540" y="200" />
        <di:waypoint x="640" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1k69s2j_di" bpmnElement="Flow_1k69s2j">
        <di:waypoint x="740" y="200" />
        <di:waypoint x="910" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0nsp97x_di" bpmnElement="Flow_0nsp97x">
        <di:waypoint x="1010" y="200" />
        <di:waypoint x="1172" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0qrn6iu_di" bpmnElement="Flow_0qrn6iu">
        <di:waypoint x="720" y="258" />
        <di:waypoint x="720" y="320" />
        <di:waypoint x="1040" y="320" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_00j2800_di" bpmnElement="Flow_00j2800">
        <di:waypoint x="670" y="258" />
        <di:waypoint x="670" y="320" />
        <di:waypoint x="480" y="320" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="272" y="182" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="278" y="225" width="25" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0ehe12m_di" bpmnElement="Activity_1wzqauq">
        <dc:Bounds x="440" y="160" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0z8sjt1_di" bpmnElement="Activity_0lijns0">
        <dc:Bounds x="640" y="160" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0rhzt3f_di" bpmnElement="Event_0rhzt3f">
        <dc:Bounds x="1172" y="182" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1180" y="225" width="20" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0jkmj4o_di" bpmnElement="Activity_1gca7eg">
        <dc:Bounds x="910" y="160" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0v3m7y1_di" bpmnElement="Activity_1p4flr2">
        <dc:Bounds x="380" y="280" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0qaisqb_di" bpmnElement="Activity_0k9j60h">
        <dc:Bounds x="1040" y="280" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Association_18y900z_di" bpmnElement="Association_18y900z">
        <di:waypoint x="653" y="246" />
        <di:waypoint x="622" y="257" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Association_1gbeptk_di" bpmnElement="Association_1gbeptk">
        <di:waypoint x="738" y="244" />
        <di:waypoint x="780" y="254" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Event_0rm859j_di" bpmnElement="Event_1jmzrm3">
        <dc:Bounds x="702" y="222" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0a2rfq3_di" bpmnElement="Event_0khrsn8">
        <dc:Bounds x="652" y="222" width="36" height="36" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>

Instance Execution:

image

Issues:

  • Interrupting boundary events are not working as expected. After an Interrupting boundary event (here A) gets executed, I expect the existing task (here Receive task) to be cancelled. Isn't that the valid scenario as it's an interrupting one?
  • I believe the send task (here Notify task) should behave like a service task. But it's service never gets called although the implementation is defined in appDelegate.
  • Timer cycle (here B) events are not working.

Could you kindly look into this?
Thanks!

Complete User Task through API

Hi,

Is it possible to complete a user task through API instead of using GUI?

I couldn't find any example on how to do this. Could you please provide an example?

Thank you!

Discrepancy with `findItems`

Consider the below example in its current state.

Current state of the running instance:

image

Issue:

I tried to find the items using findItems:

var findRes = await server.datastore.findItems({ id: instanceId, "items.elementId": taskId});
console.log("Find Result:", findRes);

Sample Input for the findItems query:

let instanceId = "a929dce1-67a7-4a15-8ff7-fd4bbff24b07";
let taskId = "planning_task";

Sample Output for the findItems query:

Find Result: [
  {
    id: '082ae8db-f315-42d2-b5d8-2a41b61df6a6',
    seq: 4,
    itemKey: null,
    tokenId: 0,
    elementId: 'planning_task',
    name: 'Planning',
    status: 'end',
    userId: 'demoUser',
    startedAt: '2022-08-31T11:47:27.761Z',
    endedAt: '2022-08-31T11:47:29.861Z',
    type: 'bpmn:UserTask',
    timeDue: null,
    data: { caseId: 5656, autoCheckStatus: 'Pass', checkStatus: 'Fail' },
    messageId: null,
    signalId: null,
    assignments: [],
    authorizations: [],
    notifications: [],
    processName: 'RTPWorkflowSample',
    instanceId: 'a929dce1-67a7-4a15-8ff7-fd4bbff24b07'
  }
]

For the above scenario, I expected that findItems would display three items in the list instead of one.

Expected Behaviour:

findItems would retrieve all the items in the instance based on the query. It would narrow down to one or few items only when the query consists of other conditions.

Returning data from script task

How do I return data from a script task as the output?

In the properties panel, not sure how to utilize the Result Variable for script task?

Thanks!

`definitions.import` options

Hi @ralphhanna,

In the updated release, I see that the definitions.import requires a filepath.
Could you please include an option to feed either a filepath or direct xml content of BPMN file to make it more flexible?

Thanks!

Error triggering Signal

Using 1.3.5

I tried running the already available example test-throw which in turn triggers test-catch.

When the end signal event is about to be triggered by test-catch, there is an error:

GET /instanceDetails?id=a2e71126-7fc8-40e7-bd5a-9853befc3dc2 200 93.849 ms - -
service  checkOutService completed-output undefined undefined
bpmnServerTest\node_modules\bpmn-server\src\elements\Node.js:81
            if (Object.keys(item.context.output).length == 0)
                       ^

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at EndEvent.<anonymous> (bpmnServerTest\node_modules\bpmn-server\src\elements\Node.js:81:24)
    at Generator.next (<anonymous>)
    at bpmnServerTest\node_modules\bpmn-server\src\elements\Node.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (bpmnServerTest\node_modules\bpmn-server\src\elements\Node.js:4:12)
    at EndEvent.getOutput (bpmnServerTest\node_modules\bpmn-server\src\elements\Node.js:80:16)
    at SignalEventBehaviour.<anonymous> (bpmnServerTest\node_modules\bpmn-server\src\elements\behaviours\MessageSignal.js:68:48)
    at Generator.next (<anonymous>)
    at bpmnServerTest\node_modules\bpmn-server\src\elements\behaviours\MessageSignal.js:8:71

Node.js v18.7.0

Kindly look into this.

Thanks!

Node Version

Is there any particular reason ^8.0.0 is mandatory? I'm currently running 14.

Guidance to handle an error scenario

Scenario:

  1. bpmn-server is running separately
  2. bpmn-client is running as a part of the main application
  3. From the main app, I have to update the states of many running processes whenever required by the main application.

Currently I'm testing the above scenario using the following script which takes 3 required inputs for invoke from the user.

Test Script
import { BPMNClient } from "bpmn-client";
import * as readline from 'readline';

const dotenv = require('dotenv');
const res = dotenv.config();

const cl = readline.createInterface( process.stdin, process.stdout );
const question = function(q) {
  return new Promise( (res, rej) => {
      cl.question( q, answer => {
          res(answer);
      })
  });
};

completeUserTask();

async function completeUserTask() {
  const server = new BPMNClient(process.env.HOST, process.env.PORT, process.env.API_KEY);

  const instanceId = await question('Please provide your Instance ID: ');
  const taskId = await question('Please provide your Task ID: ');
  let taskData = await question('Please provide your Task Data (json obj) if any: ');

  cl.close();

  if (taskData === ""){
      taskData = {};
  }else{
      taskData = JSON.parse(taskData.toString());
  }

  await server.engine.invoke(
      { id: instanceId, "items.elementId": taskId }
      , taskData);

  console.log("Completed UserTask:", taskId);
}

Sample Process:

image

BPMN File
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="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" id="Definitions_1a44rne" targetNamespace="http://bpmn.io/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="9.3.2">
<bpmn:process id="Process_0r2ybht" isExecutable="false">
  <bpmn:startEvent id="StartEvent_19yjmk7" name="Start">
    <bpmn:outgoing>Flow_1w74ars</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:sequenceFlow id="Flow_1w74ars" sourceRef="StartEvent_19yjmk7" targetRef="Activity_1ji54p4" />
  <bpmn:userTask id="Activity_1ji54p4" name="Loading">
    <bpmn:incoming>Flow_1w74ars</bpmn:incoming>
    <bpmn:outgoing>Flow_1r48lhu</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:sequenceFlow id="Flow_1r48lhu" sourceRef="Activity_1ji54p4" targetRef="Activity_0qz0c0y" />
  <bpmn:sequenceFlow id="Flow_0yn3lbi" sourceRef="Activity_0qz0c0y" targetRef="Activity_1809f44" />
  <bpmn:serviceTask id="Activity_1809f44" name="AutoCheck" implementation="rtpAutoCheck">
    <bpmn:incoming>Flow_0yn3lbi</bpmn:incoming>
    <bpmn:outgoing>Flow_0rivcwh</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:sequenceFlow id="Flow_0rivcwh" sourceRef="Activity_1809f44" targetRef="Gateway_1r8d4g2" />
  <bpmn:userTask id="Activity_131a198" name="Checking">
    <bpmn:incoming>Flow_11cwkoj</bpmn:incoming>
    <bpmn:outgoing>Flow_0qwuw2x</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_0id7guv">
    <bpmn:incoming>Flow_0qwuw2x</bpmn:incoming>
    <bpmn:outgoing>Flow_1b6byb4</bpmn:outgoing>
    <bpmn:outgoing>Flow_0bojcgd</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:sequenceFlow id="Flow_0qwuw2x" sourceRef="Activity_131a198" targetRef="Gateway_0id7guv" />
  <bpmn:sequenceFlow id="Flow_1b6byb4" name="CheckPass" sourceRef="Gateway_0id7guv" targetRef="Activity_0va5u0o">
    <bpmn:conditionExpression xsi:type="bpmn:tExpression"><![CDATA[(this.checkStatus === "Pass")]]></bpmn:conditionExpression>
  </bpmn:sequenceFlow>
  <bpmn:serviceTask id="Activity_0va5u0o" name="Generate Text File" implementation="rtpGenerateFile">
    <bpmn:incoming>Flow_1b6byb4</bpmn:incoming>
    <bpmn:outgoing>Flow_0bz5tod</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:sequenceFlow id="Flow_0bojcgd" name="CheckFail" sourceRef="Gateway_0id7guv" targetRef="Activity_0qz0c0y">
    <bpmn:conditionExpression xsi:type="bpmn:tExpression"><![CDATA[(this.checkStatus === "Fail")]]></bpmn:conditionExpression>
  </bpmn:sequenceFlow>
  <bpmn:exclusiveGateway id="Gateway_1r8d4g2">
    <bpmn:incoming>Flow_0rivcwh</bpmn:incoming>
    <bpmn:outgoing>Flow_11cwkoj</bpmn:outgoing>
    <bpmn:outgoing>Flow_0qwl78t</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:sequenceFlow id="Flow_11cwkoj" name="AutoCheckPass" sourceRef="Gateway_1r8d4g2" targetRef="Activity_131a198">
    <bpmn:conditionExpression xsi:type="bpmn:tExpression"><![CDATA[(this.autoCheckStatus === "Pass")]]></bpmn:conditionExpression>
  </bpmn:sequenceFlow>
  <bpmn:sequenceFlow id="Flow_0qwl78t" name="AutoCheckFail" sourceRef="Gateway_1r8d4g2" targetRef="Activity_0qz0c0y">
    <bpmn:conditionExpression xsi:type="bpmn:tExpression"><![CDATA[(this.autoCheckStatus === "Fail")]]></bpmn:conditionExpression>
  </bpmn:sequenceFlow>
  <bpmn:userTask id="Activity_0qz0c0y" name="Planning">
    <bpmn:incoming>Flow_1r48lhu</bpmn:incoming>
    <bpmn:incoming>Flow_0bojcgd</bpmn:incoming>
    <bpmn:incoming>Flow_0qwl78t</bpmn:incoming>
    <bpmn:outgoing>Flow_0yn3lbi</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:endEvent id="Event_0wlem5q" name="End">
    <bpmn:incoming>Flow_0bz5tod</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_0bz5tod" sourceRef="Activity_0va5u0o" targetRef="Event_0wlem5q" />
</bpmn:process>

This is just an example. My actual use case is complex with around 30 elements.

Issue:

I have been using the above test script to complete the user tasks in the above example handling different inputs for the gateways.
At some point, I received this error:

*** ERROR *** task id not valid

Error Message: *** ERROR *** task id not valid

Stacktrace:
====================
Error: *** ERROR *** task id not valid
    at Logger.error (F:\Programming\Test-BPMN-Server-125\node_modules\bpmn-server\src\common\Logger.js:66:15)
    at Execution.<anonymous> (F:\Programming\Test-BPMN-Server-125\node_modules\bpmn-server\src\engine\Execution.js:216:33)
    at Generator.next (<anonymous>)
    at fulfilled (F:\Programming\Test-BPMN-Server-125\node_modules\bpmn-server\src\engine\Execution.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: *** ERROR *** task id not valid
    at Logger.error (F:\Programming\Test-BPMN-Server-125\node_modules\bpmn-server\src\common\Logger.js:66:15)
    at Execution.<anonymous> (F:\Programming\Test-BPMN-Server-125\node_modules\bpmn-server\src\engine\Execution.js:216:33)
    at Generator.next (<anonymous>)
    at fulfilled (F:\Programming\Test-BPMN-Server-125\node_modules\bpmn-server\src\engine\Execution.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Error: *** ERROR *** task id not valid
(node:6780) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 all listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

Increasing the listeners doesn't seem to be a wise solution for this scenario. Am I right?
What am I doing wrong and how to handle such scenario without effecting the performance?

Any help would be appreciated. Thank you!

`data` in `items` array - MongoDB

Using 1.3.7

Please note, the case mentioned below doesn't seem to affect the functionality or the execution process of the instances.

In the items array of the instances in the DB, the value of data is always null.

For example, consider the example process Hungry, after the execution of the user task choose recipe, the data is saved in the main data object of the DB. No issue in that.
But I believed that would also be the case with the data inside the items array which is not the case.

image

Although it doesn't have any significance towards the execution of the instance, just thought to bring this to notice.

Thanks!

Error in `bpmn-client` when querying instances or items

Hi @ralphhanna,

Using bpmn-client version 1.3.16.

When I try to use cli.ts to do some querying, all give the error:

BPMNClient 1.2
Commands:
        q       to quit
        s       start process
        lo      list outstanding items
        li      list items
        l       list instances for a process
        di      display Instance information
        i       Invoke Task
        sgl     Signal Task
        msg     Message Task
        d       delete instnaces
        ?       repeat this list
Enter Command, q to quit
>lo
Listing Outstanding Items

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (F:\Programming\dicomHubScripts\node_modules\bpmn-client\src\BPMNClient.js:41:52)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

>di
Displaying Instance Details
Please provide your Instance ID: cd5f065a-a3b9-4189-85ad-4769d1527502

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (F:\Programming\dicomHubScripts\node_modules\bpmn-client\src\BPMNClient.js:41:52)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

>di
Displaying Instance Details
Please provide your Instance ID: "cd5f065a-a3b9-4189-85ad-4769d1527502"

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at IncomingMessage.<anonymous> (F:\Programming\dicomHubScripts\node_modules\bpmn-client\src\BPMNClient.js:41:52)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Could you kindly look into this? Thank you!

Issue with Interrupting Timer Boundary Event

Hi @ralphhanna,

image

An interrupting timer boundary event should interrupt it's main event and proceed the pathway after the timeout right? Here, it just ends the workflow outright instead of proceeding.

Could you please look into this?

Thanks

Clarification regarding configuring service task

Using version 1.3.1

Hi,

First of all, thank you so much for the new release with BPMN-Properties-Panel. It's an excellent addition.
I am almost at the end of testing phase to integrate bpmn-server in our project. I simply adore this node based server engine. It saved me a great deal of effort for our project. Thank you so much for your excellent contribution @ralphhanna. Greatly appreciated!

I have a clarification regarding the service task configuration.
Is configuring implementation through properties panel (like below) not enough?

image

Do I also have to edit the BPMN directly to add implementation property for service tasks!? It seems to be this case.
Is it supposed to be this way? It's just that all other configurations could be done through the panel except this. Seems like an odd one out.

Thanks!

Advice on a use case

Using 1.3.7

Consider the below process:

image

BPMN File
<?xml version="1.0" encoding="UTF-8"?>
<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:camunda="http://camunda.org/schema/1.0/bpmn" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn2:collaboration id="Collaboration_1rzhnaa">
    <bpmn2:participant id="Participant_0b3885w" processRef="Process_1" />
  </bpmn2:collaboration>
  <bpmn2:process id="Process_1" isExecutable="false">
    <bpmn2:startEvent id="StartEvent_1" name="Start">
      <bpmn2:outgoing>Flow_139ryiq</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:sequenceFlow id="Flow_139ryiq" sourceRef="StartEvent_1" targetRef="Activity_0rxi3rv" />
    <bpmn2:sequenceFlow id="Flow_0mcfm79" sourceRef="Activity_0rxi3rv" targetRef="Activity_07po777" />
    <bpmn2:sequenceFlow id="Flow_13t9ll9" sourceRef="Activity_07po777" targetRef="Activity_1neftxd" />
    <bpmn2:sequenceFlow id="Flow_0zxq6le" sourceRef="Activity_1neftxd" targetRef="Event_12c54t6" />
    <bpmn2:sequenceFlow id="Flow_11phwpg" sourceRef="Event_0kdjffi" targetRef="Activity_07po777" />
    <bpmn2:userTask id="Activity_0rxi3rv" name="UT1">
      <bpmn2:incoming>Flow_139ryiq</bpmn2:incoming>
      <bpmn2:outgoing>Flow_0mcfm79</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:endEvent id="Event_12c54t6" name="End">
      <bpmn2:incoming>Flow_0zxq6le</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:serviceTask id="Activity_1neftxd" name="ST">
      <bpmn2:incoming>Flow_13t9ll9</bpmn2:incoming>
      <bpmn2:outgoing>Flow_0zxq6le</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:userTask id="Activity_07po777" name="UT2">
      <bpmn2:incoming>Flow_0mcfm79</bpmn2:incoming>
      <bpmn2:incoming>Flow_11phwpg</bpmn2:incoming>
      <bpmn2:outgoing>Flow_13t9ll9</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:startEvent id="Event_0kdjffi" name="Do it again">
      <bpmn2:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="JavaScript">data.caseId=input.caseId;</camunda:script>
        </camunda:executionListener>
      </bpmn2:extensionElements>
      <bpmn2:outgoing>Flow_11phwpg</bpmn2:outgoing>
      <bpmn2:signalEventDefinition id="SignalEventDefinition_0ue4qqh" signalRef="Signal_079xuck" />
    </bpmn2:startEvent>
  </bpmn2:process>
  <bpmn2:signal id="Signal_079xuck" name="do_it_again" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1rzhnaa">
      <bpmndi:BPMNShape id="Participant_0b3885w_di" bpmnElement="Participant_0b3885w" isHorizontal="true">
        <dc:Bounds x="340" y="133" width="758" height="250" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_11phwpg_di" bpmnElement="Flow_11phwpg">
        <di:waypoint x="720" y="322" />
        <di:waypoint x="720" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0zxq6le_di" bpmnElement="Flow_0zxq6le">
        <di:waypoint x="950" y="210" />
        <di:waypoint x="1022" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_13t9ll9_di" bpmnElement="Flow_13t9ll9">
        <di:waypoint x="770" y="210" />
        <di:waypoint x="850" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0mcfm79_di" bpmnElement="Flow_0mcfm79">
        <di:waypoint x="580" y="210" />
        <di:waypoint x="670" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_139ryiq_di" bpmnElement="Flow_139ryiq">
        <di:waypoint x="428" y="210" />
        <di:waypoint x="480" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="392" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="398" y="235" width="25" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1neudnf_di" bpmnElement="Activity_0rxi3rv">
        <dc:Bounds x="480" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_12c54t6_di" bpmnElement="Event_12c54t6">
        <dc:Bounds x="1022" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1030" y="235" width="20" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1xqscau_di" bpmnElement="Activity_1neftxd">
        <dc:Bounds x="850" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_01ca7lc_di" bpmnElement="Activity_07po777">
        <dc:Bounds x="670" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0ub1sxb_di" bpmnElement="Event_0kdjffi">
        <dc:Bounds x="702" y="322" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="694" y="365" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>

My concerns:

  • First of all, is it advisable to have two start events in a process?

  • The reason I need such a use case is I have some external components (say from client side) which may trigger a process from a certain element rather from the actual start point of that process.

  • In the above BPMN process, the second start event would start a new instance with a new instanceId but the same caseId as of the original one (configured to use the same caseId in the start event of the listener)

  • Would the above cause any problems due to the same caseId or any other issues?

I couldn't test the use case from bpmn-client due to the issue. So, to emulate the above use case, I did this:

image

BPMN File
<?xml version="1.0" encoding="UTF-8"?>
<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:camunda="http://camunda.org/schema/1.0/bpmn" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn2:collaboration id="Collaboration_1vknx2d">
    <bpmn2:participant id="Participant_03flc93" processRef="Process_1" />
  </bpmn2:collaboration>
  <bpmn2:process id="Process_1" isExecutable="false">
    <bpmn2:sequenceFlow id="Flow_072nb02" sourceRef="StartEvent_1" targetRef="Activity_0dmxl8x" />
    <bpmn2:sequenceFlow id="Flow_07izf2l" sourceRef="Activity_0dmxl8x" targetRef="Gateway_1u5zpck" />
    <bpmn2:sequenceFlow id="Flow_0gq1emt" sourceRef="Gateway_1u5zpck" targetRef="Activity_1g4rdmw">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="JavaScript">(item.data.isOkay === "Yes")</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="Flow_165ni91" sourceRef="Activity_1g4rdmw" targetRef="Event_1cjrcic" />
    <bpmn2:sequenceFlow id="Flow_00mhn4x" sourceRef="Event_10fa3so" targetRef="Activity_0dmxl8x" />
    <bpmn2:startEvent id="StartEvent_1" name="Start">
      <bpmn2:outgoing>Flow_072nb02</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:startEvent id="Event_10fa3so" name="Retry_Signal">
      <bpmn2:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="JavaScript">data.caseId=input.caseId;</camunda:script>
        </camunda:executionListener>
      </bpmn2:extensionElements>
      <bpmn2:outgoing>Flow_00mhn4x</bpmn2:outgoing>
      <bpmn2:signalEventDefinition id="SignalEventDefinition_1alzj0d" signalRef="Signal_1fj0bz2" />
    </bpmn2:startEvent>
    <bpmn2:endEvent id="Event_1cjrcic" name="End">
      <bpmn2:incoming>Flow_165ni91</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:exclusiveGateway id="Gateway_1u5zpck" name="Check Something" default="Flow_1gdk8je">
      <bpmn2:incoming>Flow_07izf2l</bpmn2:incoming>
      <bpmn2:outgoing>Flow_0gq1emt</bpmn2:outgoing>
      <bpmn2:outgoing>Flow_1gdk8je</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="Flow_1gdk8je" sourceRef="Gateway_1u5zpck" targetRef="Event_1l0yihk" />
    <bpmn2:userTask id="Activity_0dmxl8x" name="Do Something">
      <bpmn2:incoming>Flow_072nb02</bpmn2:incoming>
      <bpmn2:incoming>Flow_00mhn4x</bpmn2:incoming>
      <bpmn2:outgoing>Flow_07izf2l</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:serviceTask id="Activity_1g4rdmw" name="Auto Something">
      <bpmn2:incoming>Flow_0gq1emt</bpmn2:incoming>
      <bpmn2:outgoing>Flow_165ni91</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:intermediateThrowEvent id="Event_1l0yihk" name="Retry_Signal">
      <bpmn2:extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="caseId">data.caseId</camunda:outputParameter>
        </camunda:inputOutput>
      </bpmn2:extensionElements>
      <bpmn2:incoming>Flow_1gdk8je</bpmn2:incoming>
      <bpmn2:signalEventDefinition id="SignalEventDefinition_1jq4tog" signalRef="Signal_1bcww1e" />
    </bpmn2:intermediateThrowEvent>
  </bpmn2:process>
  <bpmn2:signal id="Signal_1bcww1e" name="retry_signal" />
  <bpmn2:signal id="Signal_1fj0bz2" name="retry_signal" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1vknx2d">
      <bpmndi:BPMNShape id="Participant_03flc93_di" bpmnElement="Participant_03flc93" isHorizontal="true">
        <dc:Bounds x="240" y="140" width="728" height="250" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1gdk8je_di" bpmnElement="Flow_1gdk8je">
        <di:waypoint x="640" y="235" />
        <di:waypoint x="640" y="332" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_00mhn4x_di" bpmnElement="Flow_00mhn4x">
        <di:waypoint x="460" y="332" />
        <di:waypoint x="460" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_165ni91_di" bpmnElement="Flow_165ni91">
        <di:waypoint x="840" y="210" />
        <di:waypoint x="902" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0gq1emt_di" bpmnElement="Flow_0gq1emt">
        <di:waypoint x="665" y="210" />
        <di:waypoint x="740" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_07izf2l_di" bpmnElement="Flow_07izf2l">
        <di:waypoint x="510" y="210" />
        <di:waypoint x="615" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_072nb02_di" bpmnElement="Flow_072nb02">
        <di:waypoint x="358" y="210" />
        <di:waypoint x="410" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="322" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="328" y="235" width="25" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_17n9wwr_di" bpmnElement="Event_10fa3so">
        <dc:Bounds x="442" y="332" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="428" y="375" width="64" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1cjrcic_di" bpmnElement="Event_1cjrcic">
        <dc:Bounds x="902" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="910" y="235" width="20" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_1u5zpck_di" bpmnElement="Gateway_1u5zpck" isMarkerVisible="true">
        <dc:Bounds x="615" y="185" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="597" y="155" width="87" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1bir5ir_di" bpmnElement="Activity_0dmxl8x">
        <dc:Bounds x="410" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1be79um_di" bpmnElement="Activity_1g4rdmw">
        <dc:Bounds x="740" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1kmoab6_di" bpmnElement="Event_1l0yihk">
        <dc:Bounds x="622" y="332" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="608" y="375" width="64" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>

image

Although this works, I am not sure whether it will cause any unforeseen problems. So, thought I could check in with you!

Any help would be appreciated!
Thanks!

Significance of running engines after processes end

Hi,

I could see that there are running engines in the Workbench UI after the processes end.
If I start processes, after their end events; I suppose there should no running engines right?
But I still see two running instances (in case of 2 processes) after their end events.

Could you please explain the significance behind this?

Aside from the above question, is the data.caseId unique across all instances?

Thanks!

Parallel Gateway Convergence Problem

Hi @ralphhanna, using the Buy Used Car as an example, if the Clean (or Repair) user task branches off to another task, such as "Buy more cleaning supplies", then the Convergent Parallel Gateway (15,17) continues to be in the waiting state even though all flows leading to it has been completed. And so the Drive task can ever be reached.

I've attached the bpmn below.

ConvergentGatewayProblem
Buy Used Car With Branching.bpmn.txt






The problem remains if the divergent Inclusive Gateway has been changed to a Parallel Gateway. Again, even though all flows leading to the convergent gateway has been completed, the convergent gateway keeps on waiting.
ConvergentGatewayProblem2

Buy Used Car With Branching Parallel Gateway.bpmn.txt

Running Instances after restart or shutdown

Hi @ralphhanna,

Persistence of the instances are handled well. There is no problem in that.

The concern is this: Suppose if the engine shutdowns due to an external problem while there are some running instances, the states will be saved. But those running instances are not running anymore after the restart (I mean they don't auto-resume from where they were left). It seems one has to manually intervene to resume them.

Could this be rectified so that the engine will auto-resume their running instances from the saved state after restart or unexpected shutdown?

Thanks!

Import Issue

Using 1.3.7

When I try to import a BPMN file from local machine using the Import button, there is an ENOENT error.

But the import is proper on the demo site.

Kindly look into this. Thanks!

Exclusive Gateway Convergence

Hi @ralphhanna ,

Exclusive Gateway Convergence example:

Workflow Name: test-exclusive-gateway in https://bpmn.omniworkflow.com/

image

I expect the exclusive gateway to proceed when one of the incoming flow is complete instead it's also waiting for the other flow to complete as well. Isn't this the behaviour of parallel gateway!?

Also if the flow is progressed because of UT2, there is also a question of what should happen to the other task UT1? Should it get terminated ?

Converging exclusive gateway's behaviour is really confusing for me. ๐Ÿ˜•

Kindly look into this. Thanks.

Some clarifications

Using 1.3.6

Clarification 1:

This is related to the Issue scenario 2 mentioned in #51.

I trying to use the messageMatchingKey to handle signal events targeting a specific instance with the examples test-throw and test-catch.

I tried these three below listener options for the end signal event on test-catch process to target the specific instances of test-throw processes.

<camunda:executionListener event="end">
          <camunda:script scriptFormat="JavaScript">this.context.messageMatchingKey={'data.caseId': this.token.data.caseId };</camunda:script>
</camunda:executionListener>
<camunda:executionListener event="end">
          <camunda:script scriptFormat="JavaScript">this.messageMatchingKey={'data.caseId': this.token.data.caseId };</camunda:script>
</camunda:executionListener>
<camunda:executionListener event="end">
          <camunda:script scriptFormat="JavaScript">data.caseId= input.caseId;</camunda:script>
</camunda:executionListener>

But I can't get it to work!
I think I am missing something basic but couldn't figure it out. Sorry!
If you could kindly clarify how to handle that, it would be great.

Clarification 2:

When to use the start and end on listener scripts?

<bpmn2:extensionElements>
     <camunda:executionListener event="start">
           <camunda:script scriptFormat="JavaScript">
           </camunda:script>
     </camunda:executionListener>
</bpmn2:extensionElements>
<bpmn2:extensionElements>
     <camunda:executionListener event="end">
           <camunda:script scriptFormat="JavaScript">
           </camunda:script>
     </camunda:executionListener>
</bpmn2:extensionElements>

And what's the difference b/w them in terms of their execution?

On a related note, where may I find the documentation of properties panel and it's configuration?

Thank you!

NOT AN ISSUE! Guidance to handle an use case

Hi,

First of all, thank you so much for this sophisticated BMN server with nice set of UIs and simple configuration. Beautifully done!

If I may ask, I need some guidance how to approach the below use case.
I'm planning to implement a workflow management tool with the following specs.

  • I have around 10 different workflows (i.e., BPMN files) each one consisting of 10 to 15 different tasks; most of them are external microservices which needs to be called.
  • Per day, I'll get around 70 to 100 workloads each of which should trigger one of the 10 workflows.
  • Also need to track the states of the workflows and persist them for recovery and security

I just started dabbling around BPMN engine a few days ago. No clue, how would I approach the above use case.
I'm sorry that if my question is too broad and has various aspects to it for consideration.

But any help would be greatly appreciated! Thank you so much.

Issue with Input Parameters

Hi @ralphhanna,

Using 1.3.15

In the below workflow, there are two service tasks with their own input parameters.

image

image

My Service:

async ServiceTask(input, context) {
        console.log("Inputs:", input);
}

Output:
image

Although the input parameters destination of the two service tasks are different; the console prints the same output for both the tasks!!!

Could you please look into this?

Thank you.

Handling signal events

Using 1.3.4

Issue 1:

Consider the below example process:
image

BPMN File
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="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:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1a44rne" targetNamespace="http://bpmn.io/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="9.3.2">
  <bpmn:process id="Process_0r2ybht" isExecutable="false">
    <bpmn:startEvent id="workflow_start" name="Start">
      <bpmn:outgoing>Flow_1w74ars</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_1w74ars" sourceRef="workflow_start" targetRef="loading_task" />
    <bpmn:userTask id="loading_task" name="Loading">
      <bpmn:incoming>Flow_1w74ars</bpmn:incoming>
      <bpmn:outgoing>Flow_1r48lhu</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_1r48lhu" sourceRef="loading_task" targetRef="planning_task" />
    <bpmn:sequenceFlow id="Flow_0yn3lbi" sourceRef="planning_task" targetRef="auto_check_task" />
    <bpmn:serviceTask id="auto_check_task" name="AutoCheck" implementation="rtpAutoCheck" camunda:delegateExpression="rtpAutoCheck">
      <bpmn:extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="autoCheckStatus">output.autoCheckStatus</camunda:outputParameter>
        </camunda:inputOutput>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0yn3lbi</bpmn:incoming>
      <bpmn:outgoing>Flow_0rivcwh</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sequenceFlow id="Flow_0rivcwh" sourceRef="auto_check_task" targetRef="auto_check_gateway" />
    <bpmn:userTask id="check_task" name="Checking">
      <bpmn:incoming>Flow_11cwkoj</bpmn:incoming>
      <bpmn:outgoing>Flow_0qwuw2x</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:exclusiveGateway id="check_gateway" name="Check Status of Checking" default="Flow_1yczic8">
      <bpmn:incoming>Flow_0qwuw2x</bpmn:incoming>
      <bpmn:outgoing>Flow_1b6byb4</bpmn:outgoing>
      <bpmn:outgoing>Flow_1yczic8</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_0qwuw2x" sourceRef="check_task" targetRef="check_gateway" />
    <bpmn:sequenceFlow id="Flow_1b6byb4" name="CheckPass" sourceRef="check_gateway" targetRef="generate_text_file">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="JavaScript">(item.data.checkStatus === "Pass")</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:serviceTask id="generate_text_file" name="Generate Text File" implementation="rtpGenerateFile" camunda:delegateExpression="rtpGenerateFile">
      <bpmn:incoming>Flow_1b6byb4</bpmn:incoming>
      <bpmn:outgoing>Flow_0bz5tod</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="auto_check_gateway" name="Check Status of AutoCheck" default="Flow_11cwkoj">
      <bpmn:incoming>Flow_0rivcwh</bpmn:incoming>
      <bpmn:outgoing>Flow_11cwkoj</bpmn:outgoing>
      <bpmn:outgoing>Flow_0qwl78t</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_11cwkoj" name="AutoCheckPass" sourceRef="auto_check_gateway" targetRef="check_task" />
    <bpmn:sequenceFlow id="Flow_0qwl78t" name="AutoCheckFail" sourceRef="auto_check_gateway" targetRef="planning_task">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="JavaScript">(item.data.autoCheckStatus === "Fail")</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:userTask id="planning_task" name="Planning">
      <bpmn:incoming>Flow_1r48lhu</bpmn:incoming>
      <bpmn:incoming>Flow_0qwl78t</bpmn:incoming>
      <bpmn:incoming>Flow_04tf59t</bpmn:incoming>
      <bpmn:outgoing>Flow_0yn3lbi</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:endEvent id="workflow_end" name="End">
      <bpmn:incoming>Flow_0bz5tod</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_0bz5tod" sourceRef="generate_text_file" targetRef="workflow_end" />
    <bpmn:sequenceFlow id="Flow_04tf59t" sourceRef="replan_catch" targetRef="planning_task" />
    <bpmn:intermediateCatchEvent id="replan_catch" name="Replan">
      <bpmn:outgoing>Flow_04tf59t</bpmn:outgoing>
      <bpmn:signalEventDefinition id="SignalEventDefinition_15rsrh1" signalRef="Signal_04pyjv4" />
    </bpmn:intermediateCatchEvent>
    <bpmn:sequenceFlow id="Flow_1yczic8" name="checkFail" sourceRef="check_gateway" targetRef="Event_059jpqk" />
    <bpmn:intermediateThrowEvent id="Event_059jpqk" name="Replan">
      <bpmn:incoming>Flow_1yczic8</bpmn:incoming>
      <bpmn:signalEventDefinition id="SignalEventDefinition_1jebn3n" signalRef="Signal_1mrpgls" />
    </bpmn:intermediateThrowEvent>
  </bpmn:process>
  <bpmn:signal id="Signal_1mrpgls" name="replan_signal" />
  <bpmn:signal id="Signal_04pyjv4" name="replan_signal" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0r2ybht">
      <bpmndi:BPMNEdge id="Flow_1yczic8_di" bpmnElement="Flow_1yczic8">
        <di:waypoint x="1120" y="145" />
        <di:waypoint x="1120" y="232" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1111" y="186" width="48" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_04tf59t_di" bpmnElement="Flow_04tf59t">
        <di:waypoint x="420" y="232" />
        <di:waypoint x="420" y="160" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0bz5tod_di" bpmnElement="Flow_0bz5tod">
        <di:waypoint x="1350" y="120" />
        <di:waypoint x="1462" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0qwl78t_di" bpmnElement="Flow_0qwl78t">
        <di:waypoint x="780" y="145" />
        <di:waypoint x="780" y="200" />
        <di:waypoint x="450" y="200" />
        <di:waypoint x="450" y="160" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="579" y="182" width="72" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11cwkoj_di" bpmnElement="Flow_11cwkoj">
        <di:waypoint x="805" y="120" />
        <di:waypoint x="920" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="824" y="102" width="78" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1b6byb4_di" bpmnElement="Flow_1b6byb4">
        <di:waypoint x="1145" y="120" />
        <di:waypoint x="1250" y="120" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1169" y="102" width="57" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0qwuw2x_di" bpmnElement="Flow_0qwuw2x">
        <di:waypoint x="1020" y="120" />
        <di:waypoint x="1095" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0rivcwh_di" bpmnElement="Flow_0rivcwh">
        <di:waypoint x="660" y="120" />
        <di:waypoint x="755" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0yn3lbi_di" bpmnElement="Flow_0yn3lbi">
        <di:waypoint x="500" y="120" />
        <di:waypoint x="560" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1r48lhu_di" bpmnElement="Flow_1r48lhu">
        <di:waypoint x="340" y="120" />
        <di:waypoint x="400" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1w74ars_di" bpmnElement="Flow_1w74ars">
        <di:waypoint x="188" y="120" />
        <di:waypoint x="240" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="workflow_start">
        <dc:Bounds x="152" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="158" y="145" width="25" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_15ono2o_di" bpmnElement="loading_task">
        <dc:Bounds x="240" y="80" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0gt15u4_di" bpmnElement="auto_check_task">
        <dc:Bounds x="560" y="80" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1951bm2_di" bpmnElement="check_task">
        <dc:Bounds x="920" y="80" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_0id7guv_di" bpmnElement="check_gateway" isMarkerVisible="true">
        <dc:Bounds x="1095" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1084" y="65" width="79" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_06sqx9e_di" bpmnElement="generate_text_file">
        <dc:Bounds x="1250" y="80" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_1r8d4g2_di" bpmnElement="auto_check_gateway" isMarkerVisible="true">
        <dc:Bounds x="755" y="95" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="741" y="65" width="79" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_184uw60_di" bpmnElement="planning_task">
        <dc:Bounds x="400" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0wlem5q_di" bpmnElement="workflow_end">
        <dc:Bounds x="1462" y="102" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1470" y="145" width="20" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_02xcwur_di" bpmnElement="replan_catch">
        <dc:Bounds x="402" y="232" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="403" y="275" width="35" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1sjl09s_di" bpmnElement="Event_059jpqk">
        <dc:Bounds x="1102" y="232" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1103" y="275" width="35" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

Expected Scenario:

When the intermediate signal event is thrown, the catch picks it up & starts the user task "Planning".

Actual Scenario:

The process stops execution once the intermediate signal is thrown.

If the signal is thrown from one process and caught in another, the execution is perfect.
How to configure signal throw & catch in a single process?

Issue 2:

This is in relation to the examples test-throw and test-catch processes from #46. There is nothing in their execution. Its as expected.

But the problem is the following scenario:

  1. Say if there are two instances of test-throw which has been triggered at different times.
  2. The first instance of test-throw throws a message event & triggers the first instance of test-catch
  3. Likewise, the first instance of test-throw throws a message event & triggers the second instance of test-catch
  4. Until now it's as expected
  5. Next, when the first instance of test-catch sends a end signal event; it's caught by both the instances of test-throw and they resume.

I believe messageMatchingKey is used to handle similar scenarios in case of messages.
Could you please let me know how to configure the signal events to target a specific instance?

Thank you!

Signal Throw & Catch

Using 1.3.2

Process 1 (named RTPTestMsgThrow):

image

Process 2 (named RTPTestMsgCatch:

image

Expected Behaviour:

  1. Process 1 Starts
  2. "Pick Hotel" gets completed
  3. Process 1 throws a message for Process 2 to start
  4. Process 2 starts
  5. Service task "Welcome Guest" gets called
  6. Timer wait for 1 min
  7. Service task "Checkout" gets called
  8. Process 2 ends by signalling an event for Process 1
  9. Process 1 picks up the signal
  10. Service task "Request Review" gets called
  11. Process 1 Ends

Actual Behaviour:

Until Step 7, the execution is as expected.
On step 8, when the end signal event is launched from process 2, the process boundary-event gets called.

image

What am I doing wrong & how should I do get my expected behaviour?

Thanks!

Upgrading Properties Panel to use Form as a Camunda Form instead of Form Key only

Hi @ralphhanna ,

I would like to upgrade the Property Panel to a newer version to use Camunda Form Configuration, like this:
image

How could I upgrade the Property Panel to a newer version?
In case it couldn't, How could I customize the Form tab to use the external form? - because I checked and see the file: modeller-withPropertyPanel.js is bundled and difficult to customize.

Could you please give me some advice?
My version is 1.3.9
Thanks.

Setting implementation property to ServiceTask programmatically or when modelling

Hi,

I am aware currently one can't set the implementation property of the Service Tasks from the modeller.

Although there is a very good properties panel which can be integrated with modeler to configure additional properties to the tasks, the bpmn syntax for them is different like below:

<bpmn2:serviceTask id="Task_1" name="Task 1">
        <bpmn2:extensionElements>
          <camunda:properties>
            <camunda:property name="implementation" value="serviceTaskCall" />
          </camunda:properties>
        </bpmn2:extensionElements>
</bpmn2:serviceTask>

But bpmn-server expects the bpmn syntax to be like:

<bpmn2:serviceTask id="Task_1" name="Task 1" implementation="serviceTaskCall">
</bpmn2:serviceTask>

It would be advantageous if one could set the implementation property when modelling or through programmatically while saving the bpmn file instead of a user directly editing the bpmn file.

Could you recommend an efficient approach to achieve this?
Thank you!

Release 1.3.3

I see that bpmn-server at npm has the latest version of v1.3.3.
In here, I only see v1.3.2 in the commits.

Is v1.3.3 yet to be released?
Because I did a fresh install and the issues #41 & #42 still exist in that. Sorry, I'm just wondering!

Aside from the above question, is there any near plan for user authentication via login mechanism?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.