petriNets.taskRef-propagation.child.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of application-engine Show documentation
Show all versions of application-engine Show documentation
System provides workflow management functions including user, role and data management.
<?xml version="1.0" encoding="UTF-8"?> <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://petriflow.com/petriflow.schema.xsd"> <id>child</id> <version>1.0.0</version> <initials>CHL</initials> <title>child</title> <icon>home</icon> <defaultRole>true</defaultRole> <transitionRole>false</transitionRole> <!-- TRANSACTIONS --> <!-- ROLES --> <!-- DATA --> <data type="text"> <id>parentId</id> <title>Parent id</title> </data> <data type="text"> <id>text1</id> <title>Text1</title> <action trigger="set"> text1: f.text1, number1: f.number1; log.info("DEBUG: set action of text1 $useCase.title") change number1 value { text1.value ? (text1.value as String).length() : -1 } </action> <action trigger="set"> text1: f.text1, text2: f.text2; change text2 value { text1.value } </action> </data> <data type="text"> <id>text2</id> <title>Text2</title> <action trigger="set"> text2: f.text2, parentId: f.parentId; def parentCase = workflowService.findOne(parentId.value) setDataWithPropagation("2", parentCase, [ "text_from_child_setter": ["type": "text", "value": (text2.value) as String] ]) </action> </data> <data type="text"> <id>text3</id> <title>Text3</title> <action trigger="set"> log.info("DEBUG: set action of text3 $useCase.title") </action> <action trigger="set"> text3: f.text3, trans: t.2; make text3,visible on trans when { text3.value.contains(".txt") } make text3,editable on trans when { !text3.value.contains(".txt") } </action> <action trigger="set"> text3: f.text3, multichoice1: f.multichoice1, number1: f.number1; def newChoices = [] number1.value.times { newChoices.add("choice $it" as String) } change multichoice1 choices { newChoices } change multichoice1 value { newChoices } </action> </data> <data type="number"> <id>number1</id> <title>Number1</title> </data> <data type="enumeration"> <id>enumeration1</id> <title>Enumeration1</title> <values>11111</values> <values>22222</values> <values>33333</values> <action trigger="set"> enumeration1: f.enumeration1, parentId: f.parentId; log.info("DEBUG: set action of enumeration1 $useCase.title") def parent = workflowService.findOne(parentId.value as String) def children = parent.dataSet["children_cases"].value as Set children.each { def caseId = it as String if (caseId == useCase.stringId) return def childCase = workflowService.findOne(caseId) setDataWithPropagation("2", childCase, [ "text3": ["type": "text", "value": enumeration1.value as String] ]) } </action> </data> <data type="multichoice"> <id>multichoice1</id> <title>Multichoice1</title> </data> <data type="file"> <id>file1</id> <title>File1</title> </data> <data type="text"> <id>text_from_child</id> <title>Text from child</title> </data> <data type="text"> <id>text_from_child_setter</id> <title/> <action trigger="set"> trans: t.2, text_from_child_setter: f.text_from_child_setter, text_from_child: f.text_from_child; log.info("DEBUG: set action of text_from_child_setter $useCase.title") change text_from_child value { text_from_child_setter.value as String } make text_from_child,visible on trans when { text_from_child.value == "ABC" } make text_from_child,editable on trans when { text_from_child.value != "ABC" } </action> </data> <data type="taskRef"> <id>children</id> <title></title> </data> <!-- I18NS --> <!-- TRANSITIONS --> <transition> <id>2</id> <x>580</x> <y>220</y> <layout> <offset>0</offset> </layout> <label>Constructor</label> <dataRef> <id>text1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>text2</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>text3</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>number1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>enumeration1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>multichoice1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>file1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>text_from_child</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>children</id> <logic> <behavior>editable</behavior> </logic> </dataRef> </transition> <transition> <id>4</id> <x>780</x> <y>220</y> <layout> <offset>0</offset> </layout> <label>View</label> <dataGroup> <id>0</id> <title>Údaje inštancie</title> <dataRef> <id>text1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>number1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>enumeration1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>multichoice1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> <dataRef> <id>file1</id> <logic> <behavior>editable</behavior> </logic> </dataRef> </dataGroup> </transition> <!-- PLACES --> <place> <id>1</id> <x>460</x> <y>220</y> <label></label> <tokens>1</tokens> <static>false</static> </place> <place> <id>3</id> <x>660</x> <y>220</y> <label></label> <tokens>0</tokens> <static>false</static> </place> <!-- ARCS --> <arc> <id>5</id> <type>regular</type> <sourceId>1</sourceId> <destinationId>2</destinationId> <multiplicity>1</multiplicity> </arc> <arc> <id>6</id> <type>regular</type> <sourceId>2</sourceId> <destinationId>3</destinationId> <multiplicity>1</multiplicity> </arc> <arc> <id>7</id> <type>read</type> <sourceId>3</sourceId> <destinationId>4</destinationId> <multiplicity>1</multiplicity> </arc> </document>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy