Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Task update scenarios

Updated on July 14, 2022

Deployment Manager exposes the /task/{id} endpoint to update the task work object on the orchestrator using the PUT method. You can use the same endpoint for multiple scenarios by providing the request body using the oAuth2 credentials for authentication.

Task execution status

Update the task execution status and other relevant details (such as output parameters) using the PUT method and the /task/{id} endpoint.

Task success:

{
   "logContent":"MjAyMS0wNS0yMCAwMzow",
   "taskStatus":"Resolved-Completed",
   "errors":[
      
   ],
   "taskInfo":{
      "outputParameters":[
         {
            "label":"Actual Guardrail Score",
            "name":"ActualGuardrailScore",
            "pxObjClass":"Embed-PegaDevOps-Parameter",
            "type":"Decimal",
            "value":"84.00"
         }
      ]
   }
}

Task failure:

{
   "logContent":"MjAyMS0wNS0yMCAwMzow",
   "taskStatus":"Resolved-Rejected",
   "errors":[
      {
         "errorMessage": "Guardrail compliance score 84.0 for application UPlus 01.01.01 is less than the specified threshold 97.0",
         "pxObjClass":"Embed-PegaDevOps-Error"
      }
   ],
   "taskInfo":{
      "outputParameters":[
         {
            "label":"Actual Guardrail Score",
            "name":"ActualGuardrailScore",
            "pxObjClass":"Embed-PegaDevOps-Parameter",
            "type":"Decimal",
            "value":"84.00"
         }
      ]
   }
}

Task inProgress:

{
   "taskStatus":"Open-Inprogress",
   "taskInfo":{
      "taskType":"CheckGuardrailCompliance",
      "outputParameters":[
         {
            "name":"ActualGuardrailScore",
            "value":"",
            "type":"Decimal",
            "label":"Actual Guardrail Score"
         }
      ]
   }
}

Task needs intermediate input from user. The agent will send the possible intermediate actions that the user can choose to resume the task additionally in the request body.

{
   {
   "logContent":"MjAyMS0wNS0yMCAwNDowNTowO",
   "taskStatus":"Pending-Input",
   "intermediateStatusMessage":"Manage aged updates",
   "intermediateInputsList":[
      {
         "isNotificationRequired":"true",
         "name":"OVERRIDEAGEDUPDATES",
         "label":"Override aged updates",
         "privilege":"AgedUpdateAction",
         "content":"Aged updates in the artifact will override instances already present on the system.",
         "status":"Open-Ready"
      },
      {
         "isNotificationRequired":"false",
         "name":"VIEWAGEDUPDATES",
         "label":"View aged updates",
         "privilege":"",
         "content":"[{\"pxObjClass\":\"Data-Artifact\",\" pyName\":\"RULE-APPLICATION UPLUS 01.01.01\"}]",
         "status":"Pending-Input"
      }
   ],
   "taskInfo":{
      "outputParameters":[
         {
            "name":"RestorePoint",
            "value":"RP_20210520T040507.798_vskm"
         }
      ]
   }
}

Resume task with one of the intermediate inputs

You can resume the task from the pending-input status by choosing one of the available intermediate actions on the task work object's intermediatInputsList property. Retrieve the action name and status from the selected action and update on intermediateInput and taskStatus properties respectively. These two properties are mandatory.

There are two more optional properties to send additional information to the orchestrator based on requirements:

  1. intermediateInputParameters: pass additional details as a json string that can be used on agent while processing the task action.
  2. actionNote: Audit note that you can store on the task history object and display on the deployment history screen.
 
{
   "intermediateInput":"OVERRIDEAGEDUPDATES",
   "taskStatus":"Open-Inprogress",
   "intermediateInputParameters":"{\"key\":\"value\"}",
   "actionNote":"override aged update rules as they are temparoty changes."
}

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us