1Workflow::Condition::GrUeseedryOCRo(n3t)ributed Perl DocWuomreknftlaotwi:o:nCondition::GreedyOR(3)
2
3
4
6 Workflow::Condition::GreedyOR
7
9 Using nested conditions (See Workflow::Condition::Nested), this
10 evaluates all given conditions, returning the count of successful
11 checks. If none of the nested conditions are true, an exeption is
12 thrown.
13
15 In condition.xml:
16
17 <condition name="cond1" ... />
18 <condition name="cond2" ... />
19 <condition name="cond3" ... />
20
21 <condition name="count_approvals" class="Workflow::Condition::GreedyOR">
22 <param name="condition" value="cond1" />
23 <param name="condition" value="cond2" />
24 <param name="condition" value="cond3" />
25 </condition>
26
27 <condition name="check_approvals" class="Workflow::Condition::CheckReturn">
28 <param name="condition" value="count_approvals" />
29 <!-- operator "ge" means: greater than or equal to -->
30 <param name="operator" value="ge" />
31 <param name="argument" value="$context->{approvals_needed}" />
32 </condition>
33
34 In workflow.xml:
35
36 <state name="CHECK_APPROVALS" autorun="yes">
37 <action name="null_1" resulting_state="APPROVED">
38 <condition name="check_approvals" />
39 </action>
40 <action name="null_2" resulting_state="REJECTED">
41 <condition name="!check_approvals" />
42 </action>
43 </state>
44
46 The following parameters may be configured in the "param" entity of the
47 condition in the XML configuration:
48
49 condition, conditionN
50 The condition parameter may be specified as either a list of repeating
51 entries or with a unique integer appended to the condition string:
52
53 <param name="condition" value="first_condition_to_test" />
54 <param name="condition" value="second_condition_to_test" />
55
56 or
57
58 <param name="condition1" value="first_condition_to_test" />
59 <param name="condition2" value="second_condition_to_test" />
60
62 See Workflow
63
65 This library is free software; you can redistribute it and/or modify it
66 under the same terms as Perl itself.
67
68
69
70perl v5.30.0 2019-07-26 Workflow::Condition::GreedyOR(3)