12 Invoking POM Services

This chapter lists the ReST APIs that can be invoked and the steps needed to invoke them.

All the POM APIs are protected by the Oauth standard. It allows users to securely delegate access to resources without sharing their original credentials. Oauth2 has been around since 2012 as a standard and is built on lessons from other, earlier standards, including Oauth1 and SAML.

Note:

ReST service calls from POM to external systems (customers), such as the call for External Status Update, are limited to Basic Auth at this time.

Oauth Token Generation

Using the Oauth protocol is a two-step process:

  • Request an access token from an authentication provider: IDCS or OCI IAM.

  • Provide the access token as an authorization header when invoking a service.

Prerequisite

Customers are required to create an OAuth client using the Retail Home Create IDCS OAuth 2.0 Client function. The OAuth client must be created against the "POM" app with the scope
rgbu:pom:services-customer-administrator-<ENV_ID>

where <ENV_ID> represents the unique environment identifier such as PRD1, STG1, DEV1 and so on.

For example, the DEV1 scope would be:
rgbu:pom:services-customer-administrator-DEV1

For more information about creating the OAuth client (one-time setup), refer to the "Creating IDCS OAuth 2.0 Client Apps" chapter in the Retail Home Administration Guide.

Invoke IDCS Token Endpoint

To generate a token from IDCS, the following information is needed:

  • IDCS URL

  • Client Id and Client Secret

  • OAuth Scope

The curl command below invokes an IDCS service to generate an access token:

curl -I 
  -H 'Authorization: Basic <base64Encoded Oauth_Clientid:Secret>' 
  -H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' 
  --request POST <IDCS_URL>/oauth2/v1/token 
  -d 'grant_type=client_credentials&scope=rgbu:pom:services-customer-administrator-<ENV_ID>'

This is a standard ReST call, with the following specifics:

  • <IDCS URL> is the IDCS URL of this instance.

  • <base64Encoded OAuth_Clientid:Secret> is the Base64-encoded OAuth Client Id and Client Secret provided as a Basic Authentication header.

  • Specify the body as:

    grant_type=client_credentials&scope= 
    rgbu:pom:services-customer-administrator-<ENV_ID>

    The response to this call will be in this format:

    {
          "access_token": "<TOKEN>",
          "token_type": "Bearer",
          "expires_in": 3600
    }

Invoking the POM Service

To invoke the POM ReST service, you must add an authorization header as Bearer <token>, that is:

  • The word Bearer

  • A space

  • A valid token obtained as described above

For example, the POM nightly cycle start request would look something like the following:

curl -i 
  -H 'Authorization: Bearer <OAuth Token>'
  -H 'Content-Type: application/json' 
  --request POST 'https://<pom-server-host>/ProcessServices/services/private/executionEngine/schedules/<Schedule_Name>//execution?skipVersion' 
  -d '{ "cycleName" : "Nightly",  "flowName" : "Nightly"}'

Note:

There are POM APIs where the schedule name must be passed in the URL itself, or as part of the request payload. To get the schedule name, follow one of the following two methods:
  1. Login to POM UI and open the System Configuration screen from the Tasks menu. Under the Schedules tab, at the top of the desired schedule column, look at the name in parentheses. In the screenshot below for example, the schedule name to use in the API calls is RI. RI-Test is the Display Schedule Name.

    Schedule Name Example
  2. In the Batch Schedule spreadsheet, get the schedule name from the ScheduleName field in the Schedule sheet. Refer to the screenshot below, for example:

    ScheduleName Field

Batch Execution API

Different SaaS customers operate in different models for running their batch. Some may choose to use the POM Scheduler to schedule the different entities such as Nightly, Recurring or Standalone. Refer to the POM User Guide for documentation on the POM Scheduler.

Others may choose to control the time and frequency of batch executions by invoking the provided ReST APIs. This section describes these APIs.

Execution Request Creation

POM also provides users, the capability to control the time and frequency of batch executions by invoking the following ReST service.

HTTP Method

POST

Path

https://<pom-server-host>/ProcessServices/services/private/executionEngine/schedules/<schedule-name>/execution

<pom-server-host> - This is the POM url.

<schedule-name> - Name of the schedule being invoked.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

{
    "cycleName"         : "<Cycle name>",
    "flowName"          : "<Flow name>",
    "processName"       : "<Process name>",
    "requestParameters" : "<Comma-separated key-value pairs>"
}

cycleName – Name of the Batch Cycle being invoked. Valid values are "Nightly", "Adhoc" and "Hourly_Cycle_N" (Replace N with Hourly cycle number)

flowName – Name of the Batch Flow being invoked. In case of the Nightly Cycle invocation, the value is "Nightly". For Adhoc Processes, the value would be "Adhoc" itself.

processName–- Name of the Batch Process being invoked. Needed only when invoking Processes on Adhoc Cycles.

requestParameters – Optional attribute. This is useful if external systems would like to provide custom identifiers to POM and expect them to be returned on callbacks sent from POM.

Response Body

{
   "value"               :" Execution Request ID",
   "cycleName"           :" Cycle name",
   "flowName"            :" Flow name",
   "processName"         :" Process name",
   "requestType"         :" Request type",
   "requestParameters"   :" Comma-separated key-value pairs",
   "executionEngineInfo" :" Status of Execution Engine",
   "hyperMediaContent"   : {}
}

value –This unique identifier is the Execution Request ID. This can be used for tracking purposes as well.

executionEngineInfo - Indicates the status of the Execution Engine after creating the request. If this is not STARTED, then the Execution Engine may be experiencing some issues.

hyperMediaContent – Can be ignored. Used internally by the ReST APIs as part of the HATEOAS standards.

Examples of all the Batch Entities in POM that can be invoked by the endpoint above, are shown in the table below

Invocation Request Payload

Nightly Flow

{
       "cycleName"         :"Nightly",
       "flowName"          :"Nightly",
       "requestParameters" :"callerId=XXX,correlationId=123" 
}

Note: The Nightly Cycle contains a single default Nightly Flow. Hence a single invocation will suffice to start the Nightly Flow.

Hourly Flow

{
   "cycleName"         :"Hourly_Cycle_<N>",
   "flowName"          : "SALESPROCESS_FLOW",
   "requestParameters" :"callerId=XXX,correlationId=456"
}

<N> - This is the cycle number (1 to 24)

Note: The Hourly Cycles comprise of many distinct Batch Flows and for each Batch Flow a separate invocation is required.

Adhoc Flow

{
   "cycleName"         :"Adhoc",
   "flowName"          : "SALESPROCESS_ADHOC_FLOW",
   "requestParameters" :"callerId=XXX,correlationId=456"}

Note: The Adhoc Cycle comprises of many distinct Batch Flows and for each Batch Flow a separate invocation is required.

Adhoc Process

{
   "cycleName"         :"Adhoc",
   "flowName"          :"Adhoc",
   "processName"       :"RPM_LOCATION_PROCESS _ADHOC",
   "requestParameters" :"callerId=Ext-Name,correlationId=789" 
}

In case of Adhoc Batch Processes, the parameters for Batch Jobs can be overridden by parameters specified as part of the invocation request.

{
   "cycleName"         :"Adhoc",
   "flowName"          :"Adhoc	",
   "processName"       :"RPM_LOCATION_PROCESS _ADHOC",
   "requestParameters" :"jobParams.RPM_JOB=param1|param2" 
}

Note: Adhoc Cycles are composed of many discrete individual Batch Processes. For each Batch Process, a separate invocation is required.

Execution Request Status

The endpoint below provides the ability to check the status of an Execution Request in POM

HTTP Method

GET

Path

https://<pom-server-host>/ProcessServices/services/private/executionEngine/schedules/<schedule-name>/requests/<execution-Id>

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

<executionId> - ID of the Execution Request returned by POM.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Response Body

{
   "executionId"         :" Execution Request ID",
   "scheduleName"        :" Schedule Name",
   "cycleName"           :" Cycle name",
   "flowName"            :" Flow name",
   "processName"         :" Process name",
   "requestType"         :" Request type",
   "requestParameters"   :" Comma-separated key-value pairs",
   "executionEngineInfo" :" Status of Execution Engine",
   "hyperMediaContent"   : {}
}

executionId –- ID of the execution request

scheduleName –- Name of the schedule.

cycleName –- Name of the Cycle for which this execution request was created.

flowName –- Name of the Flow for which the execution request was created

processName –- Name of the Process. For Nightly/Hourly this is set to"AL".

requestParameters –- Parameters associated with the execution request.

status –- Status of the execution request.

Possible Values :

  • QUEUED: Request is queued up for execution.

  • RUNNING: Jobs from this request are being executed.

  • ERROR: One of the job in this request has failed. Note that a failed job would be restarted by POM Admin; there is no need to re-submit the execution request.

  • COMPLETED: All jobs from this request were executed successfully.

External Dependency API

This API operates solely on Batch External Dependencies.

Releasing External Dependency

The endpoint below releases an External Dependency setup in POM. Customers can call this endpoint to synchronize the execution of the Batch Schedule in POM with their other systems.

HTTP Method POST

URL

https://<pom-server-host>/ProcessServices/services/private/schedules/<schedule-name>/external/jobs/<ext-dependency-name>/status/COMPLETED

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

<ext-dependency-name> - Name of the External Dependency set up in POM.

Note: Ensure the status COMPLETED is specified in the path correctly, or the External Dependency will not be released.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

None

Response Body

{
  "value":"true",
  "links": [],
  "hyperMediaContent" : {
    "linkRDO": []
  }
}

value – Boolean attribute indicating the success or failure of releasing the external dependency in question.

links – Empty. Can be ignored. Part of the ReST API, HATEOAS standards.

hyperMediaContent – Can be ignored. Part of the ReST API, HATEOAS standards.

Utilities API

These APIs are general utilities, that have come as requirements from various Customers.

Business Date Alignment

This API provides the ability to adjust the business date of a Batch Schedule. This allows for aligning the business date with other schedules or a customer’s internal processing date.

HTTP Method POST

Path

https://<pom-server-host>/ProcessServices/services/public/administration/utilities/alignBusinessDate

<pom-server-host> - This is the POM URL.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

{  
 "businessDate" :"Business Date in yyyy-MM-dd format",
  "scheduleName" :"Schedule Name",
  "advanceDateOnly" :"<true|false>",
  "updateDependentSchedules" :"<true|false>",
  "comment":"<Comment>" 
}

businessDate –- Desired business date in yyyy-MM-dd format (API will determine if to move it backward or forward)

scheduleName –- Schedule name for which the business date has to be aligned

advanceDateOnly – Optional boolean flag to enforce business dates only move forward. If the business date (for the given Schedule or its dependents) has to move backwards, the request will fail. Defaults to false, if not specified.

updateDependentSchedules –- Optional boolean flag to enforce business date alignment for all Batch Schedules that are dependents of the specified Schedule.

comment – Mandatory field. Provides the reason to align business date and is mainly used for auditing purposes.

Response Body

The response of this endpoint, provides a clear understanding of which Batch Schedules were adjusted, what were their previous business dates and what their current business date is.

{
  "instances": [
      {
        "status":"<SCHEDULE_STATUS>",
        "scheduleName":"<SCHEDULE_NAME>",
        "schedulerInstanceId":"<SCHEDULER_DAY>",
        "businessDate":"<BUSINESS_DATE>",
        "previousBusinessDate":"<PREV_BUSINESS_DATE>",
        "activationTime":"<ACTIVATION_TIME>"
      }
    ]
}

instances – Array containing Schedule objects.

scheduleName – Name of the Batch Schedule adjusted.

status – Status of the Batch Schedule.

businessDate – Current business date of the Schedule

previousBusinessDate – Previous business date of Schedule, prior to adjustment.

activationTime – The time at which the Scheduler Day with the new business date was created.

Solution Diagram

The endpoint identifies dependent Schedules mainly by using the Inter-Schedule Dependency flag that is set on the System Configuration screen in POM, at a Schedule level.

Once dependent Schedules are identified, the EJB Timers used by the POM Scheduler are cancelled (if configured and in use), prior to moving the business date of the Schedule.

The general flow of this endpoint in moving the business dates of the Schedules is depicted in the flowchart below.

Solution Diagram

Custom Batch Entities API

Creating / Updating Custom Flows

This API provides the ability to create / update custom flows.

HTTP Method

PUT

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customFlows

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

Sample Request Body

{
  "name": "TEST_CUST1_CFLOW",
  "description": "Custom Flow Description",
  "creationComment": "Created for testing purposes",
  "processes": [
    {
      "name": "TEST_CUSTF1_CPROCESS",
      "description": "Custom Process Description",
      "isFirstProcess": true,
      "jobs": [
        {
          "name": "TEST_CUSTF1_CJOB",
          "description": "Custom Job Description",
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
       "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
          "thresholdRunTime": "4000",
          "modifiableParameters": true,
          "skipOnError": false
        },
        {
          "name": "TEST_CUSTF21_CJOB",
          "description": "Custom Job Description",
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
          "thresholdRunTime": "4000",
          "modifiableParameters": true,
          "skipOnError": false
        }
      ]
   },
    {
      "name": "TEST_CUSTF2_CPROCESS",
      "description": "Custom Process Description",
      "predecessors": [
        "TEST_CUSTF1_CPROCESS"
      ],
      "jobs": [
        {
          "name": "TEST_CUSTF3_CJOB",
          "description": "Custom Job Description",
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
       "thresholdRunTime": "4000",
          "modifiableParameters": true,
          "skipOnError": false
        },
        {
          "name": "TEST_CUSTF41_CJOB",
          "description": "Custom Job Description",
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
          "thresholdRunTime": "4000",
          "modifiableParameters": true,
          "skipOnError": false
        }
      ]
    },
    {
      "name": "TEST_CUSTF3_CPROCESS",
      "description": "Custom Process Description",
      "isLastProcess": true,
      "predecessors": [
        "TEST_CUSTF2_CPROCESS"
      ],
      "jobs": [
        {
          "name": "TEST_CUSTF4_CJOB",
          "description": "Custom Job Description",
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
       "thresholdRunTime": "4000",
       "modifiableParameters": true,
          "skipOnError": false
        },
        {
          "name": "TEST_CUSTF51_CJOB",
          "description": "Custom Job Description",
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
          "thresholdRunTime": "4000",
          "modifiableParameters": true,
          "skipOnError": false
        }
      ]
    }
  ]
}

Response Body

{
  "name": " TEST_CUST1_CFLOW ",
  "type": "Flow",
  "user": "POAM_ADMIN",
  "comment": "Created for testing purposes"
}

Deleting Custom Flow

This API provides the ability to delete the given custom flow.

HTTP Method

DELETE

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customFlows/<flow-name>

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

<flow-name> - Name of the flow to be deleted.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

Sample Request Body

{
  " comment": "Deleting custom flow TEST_CUST1_CFLOW”
}

Response Body

204 No content

Fetching All Custom Flows

This API provides the ability to fetch all custom flows.

HTTP Method

GET

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customFlows

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

N/A

Response Body

{
  "flows": [
    {
      "scheduleName": "RI",
      "displayScheduleName": "RITEST",
      "name": "TEST_CUST1_CFLOW",
      "description": "Custom Flow Description",
      "enabled": false,
      "useExisting": false,
      "customEntity": true,
      "processes": [
        {
          "name": "TEST_CUSTF3_CPROCESS",
          "description": "Custom Process Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "isFirstProcess": false,
          "isLastProcess": true,
          "predecessors": [
            "TEST_CUSTF2_CPROCESS"
          ],
          "jobs": [
            {
              "name": "TEST_CUSTF4_CJOB",
              "description": "Custom Job Description",
              "enabled": false,
              "useExisting": false,
              "customEntity": true,
              "type": "EXEC",
              "batchName": "dummy",
              "wrapperName": "dummy",
              "scriptDirectory": "dummy",
              "cleanupScript": "dummy",
              "application": "APP1",
              "parameters": "A B B C D E F ",
              "modifiableParameters": false,
              "skipOnError": false,
              "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
            },
            {
              "name": "TEST_CUSTF51_CJOB",
              "description": "Custom Job Description",
              "enabled": false,
              "useExisting": false,
              "customEntity": true,
              "type": "EXEC",
              "batchName": "dummy",
              "wrapperName": "dummy",
              "scriptDirectory": "dummy",
              "cleanupScript": "dummy",
              "application": "APP1",
              "parameters": "A B B C D E F ",
              "modifiableParameters": false,
              "skipOnError": false,
              "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
            }
          ]
        },
        {
          "name": "TEST_CUSTF1_CPROCESS",
          "description": "Custom Process Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "isFirstProcess": true,
          "isLastProcess": false,
          "jobs": [
            {
              "name": "TEST_CUSTF1_CJOB",
              "description": "Custom Job Description",
              "enabled": false,
              "useExisting": false,
              "customEntity": true,
              "type": "EXEC",
              "batchName": "dummy",
              "wrapperName": "dummy",
              "scriptDirectory": "dummy",
              "cleanupScript": "dummy",
              "application": "APP1",
              "parameters": "A B B C D E F ",
              "modifiableParameters": false,
              "skipOnError": false,
              "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
            },
            {
              "name": "TEST_CUSTF21_CJOB",
              "description": "Custom Job Description",
              "enabled": false,
              "useExisting": false,
              "customEntity": true,
              "type": "EXEC",
              "batchName": "dummy",
              "wrapperName": "dummy",
              "scriptDirectory": "dummy",
              "cleanupScript": "dummy",
              "application": "APP1",
              "parameters": "A B B C D E F ",
              "modifiableParameters": false,
              "skipOnError": false,
              "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
            }
          ]
        },
        {
          "name": "TEST_CUSTF2_CPROCESS",
          "description": "Custom Process Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "isFirstProcess": false,
          "isLastProcess": false,
          "predecessors": [
            "TEST_CUSTF1_CPROCESS"
          ],
          "jobs": [
            {
              "name": "TEST_CUSTF3_CJOB",
              "description": "Custom Job Description",
              "enabled": false,
              "useExisting": false,
              "customEntity": true,
              "type": "EXEC",
              "batchName": "dummy",
              "wrapperName": "dummy",
              "scriptDirectory": "dummy",
              "cleanupScript": "dummy",
              "application": "APP1",
              "parameters": "A B B C D E F ",
              "modifiableParameters": false,
              "skipOnError": false,
              "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
            },
            {
              "name": "TEST_CUSTF41_CJOB",
              "description": "Custom Job Description",
              "enabled": false,
              "useExisting": false,
              "customEntity": true,
              "type": "EXEC",
              "batchName": "dummy",
              "wrapperName": "dummy",
              "scriptDirectory": "dummy",
              "cleanupScript": "dummy",
              "application": "APP1",
              "parameters": "A B B C D E F ",
              "modifiableParameters": false,
              "skipOnError": false,
              "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
            }
          ]
        }
      ]
    }
  ]
}

Fetching a Custom Flow

This API provides the ability to fetch details of a given custom flow.

HTTP Method

GET

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customFlows/<flow-name>

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

<flow-name> - Name of the flow to be fetched.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

N/A

Response Body

{
  "scheduleName": "RI",
  "displayScheduleName": "RITEST",
  "name": "TEST_CUST1_CFLOW",
  "description": "Custom Flow Description",
  "enabled": false,
  "useExisting": false,
  "customEntity": true,
  "processes": [
    {
      "name": "TEST_CUSTF3_CPROCESS",
      "description": "Custom Process Description",
      "enabled": false,
      "useExisting": false,
      "customEntity": true,
      "isFirstProcess": false,
      "isLastProcess": true,
      "predecessors": [
        "TEST_CUSTF2_CPROCESS"
      ],
      "jobs": [
        {
          "name": "TEST_CUSTF4_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        },
        {
          "name": "TEST_CUSTF51_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        }
      ]
    },
    {
      "name": "TEST_CUSTF1_CPROCESS",
      "description": "Custom Process Description",
      "enabled": false,
      "useExisting": false,
      "customEntity": true,
      "isFirstProcess": true,
      "isLastProcess": false,
      "jobs": [
        {
          "name": "TEST_CUSTF1_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        },
        {
          "name": "TEST_CUSTF21_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        }
      ]
    },
    {
      "name": "TEST_CUSTF2_CPROCESS",
      "description": "Custom Process Description",
      "enabled": false,
      "useExisting": false,
      "customEntity": true,
      "isFirstProcess": false,
      "isLastProcess": false,
      "predecessors": [
        "TEST_CUSTF1_CPROCESS"
      ],
      "jobs": [
        {
          "name": "TEST_CUSTF3_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        },
        {
          "name": "TEST_CUSTF41_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        }
      ]
    }
  ]
}

Creating / Updating Custom Processes

This API provides the ability to create / update custom processes.

HTTP Method

PUT

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customProcesses

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

Sample Request Body

{
  "name": "TEST_CUST1_CPROCESS",
  "description": "Custom Process Description",
  "creationComment": "Created for testing purposes",
  "jobs": [
    {
      "name": "TEST_CUST5_CJOB",
      "description": "Custom Job Description",
      "type": "EXEC",
      "batchName": "dummy",
      "wrapperName": "dummy",
      "scriptDirectory": "dummy",
      "cleanupScript": "dummy",
      "application": "APP1",
      "parameters": "A B B C D E F ",
      "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
      "thresholdRunTime": "4000",
      "modifiableParameters": true,
      "skipOnError": false,
      "customEntity": true
    },
    {
      "name": "TEST_CUST61_CJOB",
      "description": "Custom Job Description",
      "type": "EXEC",
      "batchName": "dummy",
      "wrapperName": "dummy",
      "scriptDirectory": "dummy",
      "cleanupScript": "dummy",
      "application": "APP1",
      "parameters": "A B B C D E F ",
      "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
      "thresholdRunTime": "4000",
      "modifiableParameters": true,
      "skipOnError": false,
      "customEntity": true
    },
    {
      "name": "TEST_CUST71_CJOB",
      "description": "Custom Job Description",
      "type": "EXEC",
      "batchName": "dummy",
      "wrapperName": "dummy",
      "scriptDirectory": "dummy",
      "cleanupScript": "dummy",
      "application": "APP1",
      "parameters": "A B B C D E F ",
      "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY",
      "thresholdRunTime": "4000",
      "modifiableParameters": true,
      "skipOnError": false,
      "customEntity": true
    }
  ]
}

Response Body

{
  "name": "TEST_CUST1_CPROCESS",
  "type": "Process",
  "user": "POAM_ADMIN",
  "comment": "Created for testing purposes"
}

Deleting Custom Process

This API provides the ability to delete the given custom process.

HTTP Method

DELETE

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customProcesses/<process-name>

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

<process-name> - Name of the process to be deleted.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

Sample Request Body

{
  " comment": "Delete custom process TEST_CUST1_CPROCESS”
}

Response Body

204 No content

Fetching all Custom Processes

This API provides the ability to fetch all custom processes.

HTTP Method

GET

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customProcesses

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

N/A

Response Body

{
  "processes": [
    {
      "scheduleName": "RI",
      "displayScheduleName": "RITEST",
      "name": "TEST_CUST1_CPROCESS",
      "description": "Custom Process Description",
      "enabled": false,
      "useExisting": false,
      "customEntity": true,
      "isFirstProcess": false,
      "isLastProcess": false,
      "jobs": [
        {
          "name": "TEST_CUST5_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        },
        {
          "name": "TEST_CUST61_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        },
        {
          "name": "TEST_CUST71_CJOB",
          "description": "Custom Job Description",
          "enabled": false,
          "useExisting": false,
          "customEntity": true,
          "type": "EXEC",
          "batchName": "dummy",
          "wrapperName": "dummy",
          "scriptDirectory": "dummy",
          "cleanupScript": "dummy",
          "application": "APP1",
          "parameters": "A B B C D E F ",
          "modifiableParameters": false,
          "skipOnError": false,
          "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        }
      ]
    }
  ]
}

Fetching a Custom Process

This API provides the ability to fetch details of a given custom process.

HTTP Method

GET

Path

https://<pom-server-host>/ProcessServices/services/public/schedules/<schedule-name>/customProcesses/<process-name>

<pom-server-host> - This is the POM URL.

<schedule-name> - Name of the schedule being invoked.

<process-name> - Name of the process to be fetched.

HTTP Headers

Content-Type = application/json

Include Authorization header as shown in Oauth Token Generation

Request Body

N/A

Response Body

{
    "scheduleName": "RI",
    "displayScheduleName": "RITEST",
    "name": "TEST_CUST1_CPROCESS",
    "description": "Custom Process Description",
    "enabled": false,
    "useExisting": false,
    "customEntity": true,
    "isFirstProcess": false,
    "isLastProcess": false,
    "jobs": [
        {
            "name": "TEST_CUST5_CJOB",
            "description": "Custom Job Description",
            "enabled": false,
            "useExisting": false,
            "customEntity": true,
            "type": "EXEC",
            "batchName": "dummy",
            "wrapperName": "dummy",
            "scriptDirectory": "dummy",
            "cleanupScript": "dummy",
            "application": "APP1",
            "parameters": "A B B C D E F ",
            "modifiableParameters": false,
            "skipOnError": false,
            "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        },
        {
            "name": "TEST_CUST61_CJOB",
            "description": "Custom Job Description",
            "enabled": false,
            "useExisting": false,
            "customEntity": true,
            "type": "EXEC",
            "batchName": "dummy",
            "wrapperName": "dummy",
            "scriptDirectory": "dummy",
            "cleanupScript": "dummy",
            "application": "APP1",
            "parameters": "A B B C D E F ",
            "modifiableParameters": false,
            "skipOnError": false,
            "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        },
        {
            "name": "TEST_CUST71_CJOB",
            "description": "Custom Job Description",
            "enabled": false,
            "useExisting": false,
            "customEntity": true,
            "type": "EXEC",
            "batchName": "dummy",
            "wrapperName": "dummy",
            "scriptDirectory": "dummy",
            "cleanupScript": "dummy",
            "application": "APP1",
            "parameters": "A B B C D E F ",
            "modifiableParameters": false,
            "skipOnError": false,
            "enabledDaysOfTheWeek": "SUNDAY,MONDAY,TUESDAY,WEDNESDAY"
        }
    ]
}