Skip to main content


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

Publish Tasks in Batch Pega Process Fabric Hub endpoint

Updated on November 9, 2021

The Publish Tasks in Batch endpoint helps you synchronize data between your application and the Pega Process Fabric Hub in bulk. The data publication process relies on the remote application, and the Pega Process Fabric Hub only accepts data. Consequently, use relevant REST APIs to synchronize data.

You publish tasks in batch by invoking the following endpoint:

POST /tasks/batch

Each batch request can contain up to 50 request items.

The following table shows a sample request body for the Publish Tasks in Batch endpoint:

ElementValue
Request URLhttps://vlenghydcnt17263-processfabrichub.lab.pega.com/prweb/api/ppf/v1/tasks/batch
Request headersAuthorization: Bearer access token
Request body
{
  "requests": [
    {
      "method": "POST",
      "body": {
        "deadlineTime": "20211227T120000.000 GMT",
        "createOperator": "0055g000004ccPCAAY",
        "caseTypeClass": "Opportunity",
        "label": "uPlusTelco Mobile Generators",
        "priority": "10.0",
        "customerName": "uPlusTelco plc",
        "createDateTime": "20210218T120000.000 GMT",
        "caseLabel": "Opportunity",
        "caseID": "0065g000005h4BXAAY",
        "assignToType": "WL",
        "ID": "0065g000005h4BXAAY",
        "actions": [
          {
            "ID": "redirect",
            "href": "/0065g000005h4BXAAY",
            "title": "Redirect",
            "type": "GET"
          }
        ],
        "assignTo": "user1",
        "status": "New"
      }
    },
    {
      "method": "POST",
      "body": {
        "deadlineTime": "20211105T120000.000 GMT",
        "createOperator": "0055g000004ccPCAAY",
        "caseTypeClass": "Opportunity",
        "label": "uPlus Hotels Kitchen Generator",
        "priority": "60.0",
        "customerName": "uPlus Hotels & Resorts Ltd",
        "createDateTime": "20210218T120000.000 GMT",
        "caseLabel": "Opportunity",
        "caseID": "0065g000005h4BbAAI",
        "assignToType": "WL",
        "ID": "0065g000005h4BbAAI",
        "actions": [
          {
            "ID": "redirect",
            "href": "/0065g000005h4BbAAI",
            "title": "Redirect",
            "type": "GET"
          }
        ],
        "assignTo": "user1",
        "status": "New"
      }
    }
  ]
} 
Response status202
Response bodyNot applicable

After you publish all the existing open tasks, invoke the Publish Tasks in Batch REST API with the preactivationDataLast query string parameter set to true with no request body. Invoking this request informs the Pega Process Fabric Hub that the tasks synchronization is complete.

In the Pega Process Fabric Hub, the registered application is in the Sync-InProgress state. To inform the Pega Process Fabric Hub that the application published the assignment data, set the preactivationDataLast query string parameter to true and invoke the Publish Tasks in Batch REST API. To move the application to the Active state, synchronize work queues and operators data.

The following table shows information about the endpoint that you invoke to inform the Pega Process Fabric Hub that the application published all the assignment data:

ElementValue
Request URLhttps://vlenghydcnt17263-processfabrichub.lab.pega.com/prweb/api/ppf/v1/tasks/batch?preactivationDataLast=true
Request headersAuthorization: Bearer access token
Request bodyNot applicable
Response status202
Response bodyNot applicable

URL redirects

For assignments REST APIs, include an assignment redirect URL in the request payload. The redirect URL and the registration system URL form the absolute assignment redirect URL. When an end user clicks an assignment link in the Pega Process Fabric Hub, the browser opens the absolute redirect URL in a new tab.

The following table shows a sample request payload:

ElementValue
Assignment URLhttps://ap15.uplustelco.com/0065g000002fJBpAAM
systemURL property in the Create Registration REST APIhttps://ap15.uplustelco.com
actions.href property in the Publish Tasks in Batch REST API\/0065g000002fJBpAAM
Sample request payload
{
    "requests": [
     {
     "method": "POST",
     "body": {
      "deadlineTime": "20211227T120000.000 GMT",
      "createOperator": "0055g000004ccPCAAY",
      "caseTypeClass": "Opportunity",
      "label": "uPlusTelco Mobile Generators",
      "priority": "10.0",
      "customerName": "uPlusTelco plc",
      "createDateTime": "20210218T120000.000 GMT",
      "caseLabel": "Opportunity",
      "caseID": "0065g000005h4BXAAY",
      "assignToType": "WL",
      "ID": "0065g000005h4BXAAY",
      "actions": [
       {
        "ID": "redirect",
        "href": "/0065g000005h4BXAAY",
        "title": "Redirect",
        "type": "GET"
       }
    ],
    "assignTo": "user1",
    "status": "New"
    }
   },
   {
    "method": "POST",
    "body": {    
    "deadlineTime": "20211105T120000.000 GMT",
    "createOperator": "0055g000004ccPCAAY",   
    "caseTypeClass": "Opportunity",
    "label": "uPlus Hotels Kitchen Generator",
    "priority": "60.0",
    "customerName": "uPlus Hotels & Resorts Ltd",
    "createDateTime": "20210218T120000.000 GMT",
    "caseLabel": "Opportunity",
    "caseID": "0065g000005h4BbAAI",
    "assignToType": "WL",
    "ID": "0065g000005h4BbAAI",
    "actions": [
     {
      "ID": "redirect",
      "href": "/0065g000005h4BbAAI",
      "title": "Redirect",
      "type": "GET"
     }
    ],
    "assignTo": "user1",
    "status": "New"
   }
  }
 ]
}

For more information, see the Swagger documentation.

  • Previous topic Accessing Pega Process Fabric Hub data synchronization endpoints
  • Next topic Publish Real Time Tasks Pega Process Fabric Hub endpoint

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