Class: OpenWFE::ControlClient
- Inherits:
-
RestClient
- Object
- RestClient
- OpenWFE::ControlClient
- Defined in:
- lib/openwfe/orest/controlclient.rb
Overview
This client is used to connect to an OpenWFE engine to call ‘control methods’ for monitoring process instances, freezing or cancelling them
Instance Attribute Summary
Attributes inherited from RestClient
#host, #port, #resource, #session_id
Instance Method Summary collapse
-
#cancel_expression(flowExpressionId) ⇒ Object
Cancels a given expression (and potentially its whole subtree).
-
#freeze_expression(flowExpressionId) ⇒ Object
Freezes an expression (and potentially its whole subtree).
-
#get_flow_position(workflowInstanceId) ⇒ Object
(also: #get_flow_stack)
Returns the list of expressions currently applied for a given workflow instance.
-
#initialize(url, username, password) ⇒ ControlClient
constructor
A new instance of ControlClient.
-
#list_expressions ⇒ Object
Returns the list of controlable expressions.
-
#unfreeze_expression(flowExpressionId) ⇒ Object
Unfreezes an expression (and potentially its whole subtree).
Methods inherited from RestClient
Constructor Details
#initialize(url, username, password) ⇒ ControlClient
52 53 54 55 |
# File 'lib/openwfe/orest/controlclient.rb', line 52 def initialize (url, username, password) super(url, username, password) end |
Instance Method Details
#cancel_expression(flowExpressionId) ⇒ Object
Cancels a given expression (and potentially its whole subtree)
83 84 85 86 87 88 89 90 |
# File 'lib/openwfe/orest/controlclient.rb', line 83 def cancel_expression (flowExpressionId) fei = OpenWFE.encode(flowExpressionId) params = {} decode(self.post('cancelexpression', nil, params, fei)) end |
#freeze_expression(flowExpressionId) ⇒ Object
Freezes an expression (and potentially its whole subtree)
95 96 97 98 99 100 101 102 |
# File 'lib/openwfe/orest/controlclient.rb', line 95 def freeze_expression (flowExpressionId) fei = OpenWFE.encode(flowExpressionId) params = {} decode(self.post('freezeexpression', nil, params, fei)) end |
#get_flow_position(workflowInstanceId) ⇒ Object Also known as: get_flow_stack
Returns the list of expressions currently applied for a given workflow instance
70 71 72 73 74 75 76 77 |
# File 'lib/openwfe/orest/controlclient.rb', line 70 def get_flow_position (workflowInstanceId) params = {} params['id'] = workflowInstanceId r = self.get('getflowposition', nil, params) decode(r) end |
#list_expressions ⇒ Object
Returns the list of controlable expressions
60 61 62 63 64 |
# File 'lib/openwfe/orest/controlclient.rb', line 60 def list_expressions () r = self.get('listexpressions', nil, nil) decode(r) end |
#unfreeze_expression(flowExpressionId) ⇒ Object
Unfreezes an expression (and potentially its whole subtree)
107 108 109 110 111 112 113 114 |
# File 'lib/openwfe/orest/controlclient.rb', line 107 def unfreeze_expression (flowExpressionId) fei = OpenWFE.encode(flowExpressionId) params = {} decode(self.post('unfreezeexpression', nil, params, fei)) end |