How to check status of HPOO flow?

I want to check if the flow is running or passed or failed.

I have written the following query which always 

select execution_state from run_history where run_id =  ${RunId};

 

Please let me know if there is a better approach to know the current state of the flow.

  • You can check the execution status using REST API.  

    GET<central_url>/rest/v2/executions/3332190961082830376,679861347442169334/summary 

    This will return the following information in a json format:

    [{

    "executionId":"3332190961082830376", "branchId":null, "startTime":1371475041169, "endTime":null,

    "status":"PAUSED", "resultStatusType":"RESOLVED", "resultStatusName":"HAHA", "pauseReason":"USER_PAUSED", "owner":"anonymous", "ownerDomain:null", "triggeredBy":"anonymous",

    "flowUuid":"a8e8fc10-b584-4d39-921f-987b29c9dd19", "flowPath":null,

    "executionName":"mock flow", "triggeringSource:central" "roi":null

    },

    {

    "executionId":"679861347442169334", "branchId":null, "startTime":1371475041169, "endTime":null,

    "status":"PAUSED", "resultStatusType":"RESOLVED", "resultStatusName":"HAHA", "pauseReason":"USER_PAUSED", "owner":"anonymous", "ownerDomain:null", "triggeredBy":"anonymous",

    "flowUuid":"a8e8fc10-b584-4d39-921f-987b29c9dd19",

    "flowPath":null, "executionName":"mock flow", "triggeringSource:central" "roi":null

    }

    ]

    For more information, please check the API guide on Get Execution Summary section

  • How can I get the output of the flow after execution of my flow? is there any API end point?

  • Sure, this would be the endpoint: 

    Request: GET /executions/{executionId}/execution-log

    (<protocol>://<central_url>/oo/rest/v2/executions/{executionId}/execution-log)

    And this is the json object that will be received:

    {

    "executionSummary":{

    "executionId":"348246628680024354",

    "branchId":null,

    "startTime":1371366300297,

    "endTime":null,

    "status":"PAUSED",

    "resultStatusType":"RESOLVED",

    "resultStatusName":"HAHA",

    "pauseReason":"USER_PAUSED",

    "owner":"anonymous",

    "ownerDomain:null",

    "triggeredBy":"anonymous",

    "flowUuid":"a8e8fc10-b584-4d39-921f-987b29c9dd19",

    "flowPath":null,

    "executionName":"mock flow",

    "triggeringSource:central"

    "roi":null

    },

    "executionLogLevel": "STANDARD",

    "flowVars":[

    {

    "name":"flowVar0",

    "termName":"flowVar0TermName",

    "value":"flowVar0Value"

    },

    {

    "name":"flowVar1",

    "termName":"flowVar1TermName",

    "value":"flowVar1Value"

    },

    ],

    "flowOutput":{

    "flowOutput4":"flowOutput4Value",

    "flowOutput3":"flowOutput3Value",

    "flowOutput0":"flowOutput0Value",

    "flowOutput2":"flowOutput2Value",

    "flowOutput1":"flowOutput1Value"

    }

    }

     

    For more information you can check the API Guide on the Get Execution Log section.