Skip to content

Commit

Permalink
Merge pull request #244 from sartography/pr_feedback
Browse files Browse the repository at this point in the history
Follow up on service task bug fix, quote string literals
  • Loading branch information
danfunk authored Oct 4, 2022
2 parents e967d2e + ca51db3 commit ea375ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
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

0 comments on commit ea375ac

Please sign in to comment.