Skip to content

Commit

Permalink
fix describe of ioparameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphhanna committed Jan 24, 2024
1 parent 6889d58 commit 5e4d02a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class AppServices {
<bpmn:sequenceFlow>

<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression" language="JavaScript">
$(data.needsCleaning=="Yes")
(data.needsCleaning=="Yes")
</bpmn:conditionExpression>
..

Expand Down
8 changes: 7 additions & 1 deletion docs/execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,18 @@ Scripts and Services can impact workflow in the following manners:

# Raisng Errors and Exceptions
## Validation Scripts
Validation Scripts can return and error object as such:
Validation Scripts can return an error as such:
```
return {error:'Invalid input'};
```
or:
```
execution.validationError('invalid input');
```
As a result execution will raise an exception and the command will fail.

## BPMN Errors

All Scripts and Services can Raise `BPMN Errors`, to be handled by the appropriate Error node
```
execution.throwError('error code');
Expand Down
16 changes: 14 additions & 2 deletions docs/invokation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Since workflow require a User Interface, a web-app is required as front-end to i
- Show outstanding Tasks
- Show recent Tasks

[see Buy Used Car Demo ](./examples/BuyCar-Web.md)
[see Demo of WebApp ](./examples/BuyCar-Web.md)

## Invoking Proccess through API

Expand Down Expand Up @@ -36,7 +36,19 @@ In real applications, you get userName and userGroups from you application UserA

## [Invoking Remotely Using WebServices](./examples/BuyCar-Remote.md)

Similar to above, API can be invoked remotely
NPM package 'bpmn-client' provide access to bpmn-server using remotely using webServices
```ts

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

test();

async function test() {

const client = new BPMNClient(process.env.HOST, process.env.PORT, process.env.API_KEY);

let response = await client.engine.start('Buy Used Car');
```
### Async Execution
Expand Down
3 changes: 1 addition & 2 deletions src/elements/behaviours/IOBehaviour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,9 @@ JavaScript| { 'key1': 'val1', 'key2': 'val2' , 'key3': [item.data.myExistingVar,
else if (this.subType == 'camunda:map') {
val = new Map();
(this.value).forEach((value, key) => {
//const newVal = item.token.execution.appDelegate.scopeEval(item, value);
val.set(key, value)
});
val='map:'+JSON.stringify(val);
val='map:'+Array.from(val.entries());
}
else if (this.subType == 'camunda:script') {
val = 'script:'+this.value;
Expand Down

0 comments on commit 5e4d02a

Please sign in to comment.