-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use cmmn script task expression value if no string value is missing a…
…nd do not throw exception if field is missing Not throwing the exception aligns this with the way it works for BPMN, where no exception is thrown by the model. There will eventually be an exception thrown when the script is executed
- Loading branch information
Showing
3 changed files
with
79 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ter/src/test/resources/org/flowable/test/cmmn/converter/script-task-expression-field.cmmn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<definitions xmlns="http://www.omg.org/spec/CMMN/20151109/MODEL" | ||
xmlns:dc="http://www.omg.org/spec/CMMN/20151109/DC" | ||
xmlns:di="http://www.omg.org/spec/CMMN/20151109/DI" | ||
xmlns:cmmndi="http://www.omg.org/spec/CMMN/20151109/CMMNDI" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.omg.org/spec/CMMN/20151109/MODEL https://www.omg.org/spec/CMMN/20151109/CMMN11.xsd | ||
http://www.omg.org/spec/CMMN/20151109/DC https://www.omg.org/spec/CMMN/20151109/DC.xsd | ||
http://www.omg.org/spec/CMMN/20151109/DI https://www.omg.org/spec/CMMN/20151109/DI.xsd | ||
http://www.omg.org/spec/CMMN/20151109/CMMNDI https://www.omg.org/spec/CMMN/20151109/CMMNDI11.xsd" | ||
xmlns:flowable="http://flowable.org/cmmn" | ||
targetNamespace="http://flowable.org/cmmn"> | ||
|
||
<case id="scriptCase" flowable:initiatorVariableName="test"> | ||
<casePlanModel id="myScriptPlanModel" name="My Script CasePlanModel"> | ||
|
||
<planItem id="planItemTaskA" definitionRef="taskA" /> | ||
<planItem id="planItemTaskB" definitionRef="taskB" /> | ||
<task id="taskA" name="A" flowable:type="script" flowable:scriptFormat="javascript" flowable:resultVariableName="scriptResult" flowable:autoStoreVariables="false"> | ||
<extensionElements> | ||
<flowable:field name="script"> | ||
<expression><![CDATA[var a = '${testA}';]]></expression> | ||
</flowable:field> | ||
</extensionElements> | ||
</task> | ||
|
||
<task id="taskB" name="B" flowable:type="script" flowable:scriptFormat="groovy" flowable:autoStoreVariables="true"> | ||
<extensionElements> | ||
<flowable:field name="script"> | ||
<expression><![CDATA[var b = '${testB}';]]></expression> | ||
</flowable:field> | ||
</extensionElements> | ||
</task> | ||
|
||
</casePlanModel> | ||
</case> | ||
|
||
</definitions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters