<
From version < 8.1 >
edited by Stefan Warnat
on 2021/09/19 23:52
To version < 9.1 >
edited by Stefan Warnat
on 2021/09/19 23:53
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +execute Workflow/Expression with external Record
Parent
... ... @@ -1,0 +1,1 @@
1 +Workflow Designer.Workflow Examples.WebHome
Default language
... ... @@ -1,1 +1,1 @@
1 -de
1 +en
Content
... ... @@ -1,0 +1,59 @@
1 +This example is triggered everytime a Project Task is updated and execute a Workflow from Module “Project” to summarize working hours.
2 +
3 +The Workflow within Project Tasks looks like this:
4 +
5 +[[image:Screen1480874922.png]]
6 +
7 +----
8 +
9 +The start action configuration:
10 +
11 +[[image:Screen1480874993.png]]
12 +
13 +The workflow will only executed, if a Project is set within the Task. (Should be the default case)
14 +Then the “Execute Workflow with external Record” search the Project Record and execute another Workflow, you see below.
15 +
16 +----
17 +
18 +Configuration of  execute Workflow with external records:
19 +
20 +[[image:Screen1480875035.png]]
21 +
22 +----
23 +
24 +=== Workflow in module “Projects” triggered by ProjectTask Workflow ===
25 +
26 +[[image:Screen1480875568-768x263.png]]
27 +
28 +----
29 +
30 +Start condition:
31 +
32 +[[image:Screen1204192116001-768x448.png]]
33 +
34 +----
35 +
36 +The variable initialization:
37 +
38 +[[image:Screen1204192157001.png]]
39 +
40 +----
41 +
42 +Summarize all records, which are related to this Project ID.
43 +
44 +[[image:Screen1204192225001-768x343.png]]
45 +
46 +----
47 +
48 +Set the result into a field
49 +
50 +[[image:Screen1204192248001-768x168.png]]
51 +
52 +This workflow is not executed automatically. (Start Trigger set to “start manually”)
53 +
54 +Because we sum the working hour field about multiple records, we net to initialize the variable and set $env[“hours”] to 0.
55 +
56 +The “execute Expression with external Record” execute an small script for every record, which match the the condition. (In this case: Tasks, which are related to the current Project ID)
57 +The script will add the value of $projecttaskhours to the current $env[“hours”] variable.
58 +
59 +The last step is to set this value to the Project field “Total Working Time”

Page Translations

Translate this page in: de 

©2021 Redoo Networks GmbH
Powered with ♥ by XWiki