Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up on service task bug fix, quote string literals #244

Merged
merged 1 commit into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions SpiffWorkflow/spiff/specs/service_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@ def _result_variable(self, task):

def _execute(self, task):
def evaluate(param):
try:
param['value'] = task.workflow.script_engine.evaluate(task,
param['value'])
except:
pass

param['value'] = task.workflow.script_engine.evaluate(task, param['value'])
return param

operation_params_var_name = 'spiff__operation_params'
Expand Down
4 changes: 2 additions & 2 deletions tests/SpiffWorkflow/spiff/data/service_task.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<bpmn:extensionElements>
<spiffworkflow:serviceTaskOperator id="bamboohr/GetPayRate">
<spiffworkflow:parameters>
<spiffworkflow:parameter id="api_key" type="string" value="secret:BAMBOOHR_API_KEY" />
<spiffworkflow:parameter id="api_key" type="string" value="'secret:BAMBOOHR_API_KEY'" />
<spiffworkflow:parameter id="employee_id" type="string" value="4" />
<spiffworkflow:parameter id="subdomain" type="string" value="ServiceTask" />
<spiffworkflow:parameter id="subdomain" type="string" value="'ServiceTask'" />
</spiffworkflow:parameters>
</spiffworkflow:serviceTaskOperator>
</bpmn:extensionElements>
Expand Down
4 changes: 2 additions & 2 deletions tests/SpiffWorkflow/spiff/data/service_task_variable.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<bpmn:extensionElements>
<spiffworkflow:serviceTaskOperator id="bamboohr/GetPayRate">
<spiffworkflow:parameters>
<spiffworkflow:parameter id="api_key" type="str" value="secret:BAMBOOHR_API_KEY" />
<spiffworkflow:parameter id="api_key" type="str" value="'secret:BAMBOOHR_API_KEY'" />
<spiffworkflow:parameter id="employee_id" type="str" value="employeeID" />
<spiffworkflow:parameter id="subdomain" type="str" value="statusdemo" />
<spiffworkflow:parameter id="subdomain" type="str" value="'statusdemo'" />
</spiffworkflow:parameters>
</spiffworkflow:serviceTaskOperator>
</bpmn:extensionElements>
Expand Down