Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:

- name: Notify msa-docker repo about updated ${{ env.CONTAINER_NAME }} Docker image
uses: benc-uk/workflow-dispatch@v1
if: github.event_name != 'pull_request'
with:
token: ${{ secrets.MSA_DOCKER_REPO_ACCESS_TOKEN }}
ref: ${{ github.ref_name || 'master' }}
Expand Down
14 changes: 5 additions & 9 deletions Reference/Template/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,11 @@
wo_comment : Appropriate Comment to display as per the success/failure of the Task
wo_newparams : json_body parameters returned from this Task

Function process_content() takes care of Creating a Json response from inputs
This function definiton can be found at : http://[YOUR_MSA_URL]/msa_sdk/msa_api.html#msa_sdk.msa_api.MSA_API.process_content
Functions task_success(), task_warning(), task_error(), task_pause() take care of creating a Json response from inputs
These function definitions can be found at : http://[YOUR_MSA_URL]/msa_sdk/msa_api.html
NOTE : For 'wo_newparams', always pass "context" [whether wo_status is ENDED/FAILED/WARNING to preserve it across Service Instance]
-> Last argument "true" mentions whether the json_response to be Logged in the logfile : /opt/jboss/latest/logs/process.log
-> If not passed, it's "false"

The response "ret" should be echoed from the Task "print(ret)" which is read by Orchestration Engine
In case of FAILURE/WARNING, the Task can be Terminated by calling "exit" as per Logic
-> The optional third argument mentions whether the json_response to be logged in the logfile : /opt/jboss/latest/logs/process.log
-> If not passed, it's "true"
'''
ret = MSA_API.process_content('ENDED', 'Task OK', context, True)
print(ret)
MSA_API.task_success('Task OK', context)