1Workflow::Condition::HaUssUesrerC(o3n)tributed Perl DocuWmoernktfaltoiwo:n:Condition::HasUser(3)
2
3
4
6 Workflow::Condition::HasUser - Condition to determine if a user is
7 available
8
10 This documentation describes version 1.60 of this package
11
13 # First setup the condition
14
15 <conditions>
16 <condition name="HasUser"
17 class="Workflow::Condition::HasUser">
18 <param name="user_key" value="CurrentUser" />
19 </condition>
20 ...
21
22 # Next, attach it to an action
23
24 <state name="INITIAL">
25 <action name="create issue"
26 resulting_state="CREATED">
27 <condition name="CurrentUser" />
28 </action>
29 ...
30
31 # Whenever you fetch available actions from state 'INITIAL' you must
32 # have the key 'CurrentUser' defined in the workflow context
33
35 Simple -- possibly too simple -- condition to determine if a user
36 exists in a particular context key. Actually, it really only determines
37 if something exists in a key, but we needed a simple condition to ship
38 with the module.
39
40 Parameters
41 You can configure the condition with the following parameters:
42
43 • user_key, optional
44
45 Key in workflow context to check for data. If not specified we use
46 'current_user'.
47
48 METHODS
49 evaluate ( $wf )
50
51 Method to evaluate whether a user has been set for a workflow.
52
53 Takes a workflow object as parameter
54
55 Throws Workflow::Exception if evaluation fails
56
58 • Workflow::Condition
59
61 Copyright (c) 2004-2022 Chris Winters. All rights reserved.
62
63 This library is free software; you can redistribute it and/or modify it
64 under the same terms as Perl itself.
65
66 Please see the LICENSE
67
69 Please see Workflow
70
71
72
73perl v5.36.0 2022-07-22 Workflow::Condition::HasUser(3)