cancel
Showing results for 
Search instead for 
Did you mean: 

Information on API for PaPM Cloud

0 Kudos
631

Hi Experts,

We are referring this API Portal : https://api.sap.com/api/P1_PROCESSING/tryout for triggering our activities in PaPM from another tool.

1. We would like to know if there is any API to change the activity state in the process template to 'COMPLETE' only after successful execution as we notice that we are able to see the state change to 'COMPLETE' even if the activity ends up in execution error using the "postRunAction": "UPDATE_ACTIVITY_STATE" parameter in the body while using POST /CreateDeployRunActivityAsync API.

2. If there is any API to give a message saying 'Successful' or 'Failure' in PaPM after the execution of activity from another tool.

Please let us know.

Thank you,

Soundarya C Adiga


Accepted Solutions (0)

Answers (1)

Answers (1)

Angelou
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Soundarya,

Changing an activity state using the API is possible using the PATCH method for CUPA entities.

First, put the correct Parameters for Client, ENV_ID, VER, FID(Calculation Unit ID), PROC_ID and ACTIVITY function ID. Then on the Body tab, put the values that you have on the existing activity. Example:

{

"SEQ": "0000002",

"LEV": "0000000",

"ACTIVITY_TYPE": "IO",

"ACTIVITY_STATE": "COMPLETED",

"ACTIVITY_FID": "QEVCP",

"PERFORMER_GRP": "",

"START_DATE": "2022-08-18",

"DUE_DATE": "2022-08-20",

"REVIEWER_GRP": "",

"DESCR": "Value Chain Analytical Data Input - Process Industry",

"ACT_COMMENT": "",

"ACT_REL_OBJ_KEY": "",

"PACTIVITY": "REVIEW",

"URL": ""

}

These are the values of my process activity in JSON Format with the activity state that I wanted to be for my process activity after I run this API activity.

After pressing the RUN button, it will return a 200 message means that the execution was successful and will return again a response body containing the new values of the process activity. See image below for example:

Hope this one helps!

Best Regards,
Angelou