Process Analytics REST API Services
This section lists and explains the services within the Process Analytics section of the Optimize REST Services API. These services enable users to access process related analytic data that is produced by the Optimize Analytic Engine.
Process Metric Data
This service returns various aggregated process metric data for a specified process and time range. The data is derived from the process instances that were active during the time range. Cycle time statistical calculations can be derived from either the optional statsInterval parameter or from the size of the given range.
Time Range | Statistical Interval |
---|---|
<= 12 hours | 1 hour |
<= 2 days | 4 hours |
<= 2 weeks | 1 day |
<= 4 weeks | 1 week |
> 4 weeks | 4 weeks |
The URL format is as follows:
http://${optimize host}:${port}/services/rest/api/ProcessAnalytics/
ProcessMetrics?processModelId=${processModelId}&startTime=${startTime}&endTime
=${endTime}&statsInterval=${statsInterval}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Process Metrics Result Example
<processMetrics>
<cycleTimeAverage>0.18</cycleTimeAverage>
<cycleTimeHistoricalAverage>0.2</cycleTimeHistoricalAverage>
<cycleTimeMax>1200000</cycleTimeMax>
<cycleTimeMin>650000</cycleTimeMin>
<cycleTimeStandardDeviation>0.2</cycleTimeStandardDeviation>
<endTime>2014-08-01T09:46-06:00</endTime>
<endTimeAsJavaEpoch>1406907960000</endTimeAsJavaEpoch>
<ruleViolationCount>2</ruleViolationCount>
<ruleViolationsOpen>1</ruleViolationsOpen>
<startTime>2014-05-01T09:46-06:00</StartTime>
<startTimeAsJavaEpoch>1398959160000</startTimeAsJavaEpoch>
<volumeCompleted>5</volumeCompleted>
<volumeInProgress>1</volumeInProgress>
<volumeStarted>1</volumeStarted>
</processMetrics>
Process Instances
This service returns a list of process instances for a specified process and time range. Optionally, a status filter can be specified as well as a maximum results limiter. If the results are truncated by the maxResults limiter, the most recent instances will returned.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/ProcessInstances?processModelId=${processModelId}&startTime=${startTime}&endTime=${endTime}&status=${status}&maxResults=${maxResults}
http://localhost:12503/services/rest/api/ProcessAnalytics/
ProcessInstances?processModelId=OrderFulfillment&startTime
=1407996000000&endTime=1408049935760&status=STARTED&maxResults=10
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Process Instances Result Example
<results>
<processInstances>
<processInstance xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xsi:type="processInstance">
<processInstanceId>393x3-389x-ey393-56ez</processInstanceId>
<processModelId>Order Fulfillment</processModelId>
<processModelType>BAM</processModelType>
<deploymentVersion>1</deploymentVersion>
<cycleTime>0.2</cycleTime>
<instanceIteration>1</instanceIteration>
<trackingStatus>RUNNING</trackingStatus>
<processInstanceSeverity>NONE</processInstanceSeverity>
<startTime>2014-05-01T09:46-06:00</startTime>
<startTimeAsJavaEpoch>1398959160000</startTimeAsJavaEpoch>
<endTime>16006368-12-25T08:50-0700</endTime>
<endTimeAsJavaEpoch>505050050505055050</endTimeAsJavaEpoch>
</processInstance>
</processInstances>
<totalCount>1</totalCount>
</results>
Process Tracking Errors
Returns a count of process tracking errors that occurred for a specified process and time range. Optimize detects tracking errors during runtime analysis. Tracking errors can be built-in, such as stepOutOfSequence or user defined such as a process timeout.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/ProcessErrors?processModelId=${processModelId}&startTime=${startTime}&endTime=${endTime}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Process Tracking Errors Result Example
<processErrors>
<processError>
<errorType>Timeout</errorType>
<errorCount>22</errorCount>
</processError>
</processErrors>
Step Instances
This service returns step instance data for a specified process, step and time range. Results can be filtered by the status of the step instance, such as completed or running. The step instance includes execution data and tracking data as well as step definition data.
The URL format is as follows:
http://${optimize host}:${port}/services/rest/api/ProcessAnalytics/
StepInstances?processModelId=${processModelId}&stepId=${stepId}&startTime
=${startTime}&endTime=${endTime}&status=${status}&maxResults=${maxResults}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Step Instances Result Example
<results>
<stepInstances>
<stepInstance xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xsi:type="stepInstance">
<analysisEnabled>true</analysisEnabled>
<deploymentVersion>1</deploymentVersion>
<startTime>2014-07-30T10:25-06:00</startTime>
<startTimeAsJavaEpoch>1398959160000</startTimeAsJavaEpoch>
<endTime>2014-08-01T09:46-06:00</endTime>
<endTimeAsJavaEpoch>1406907960000</endTimeAsJavaEpoch>
<processInstanceId>393x3-389x-ey393-56ez</processInstanceId>
<instanceIteration>1</instanceIteration>
<loopIteration>0</loopIteration>
<parentInstanceIteration>0</parentInstanceIteration>
<processInstanceStatus>COMPLETED</processInstanceStatus>
<processModelId>Order Fulfillment</processModelId>
<stepInstanceStatus>RUNNING</stepInstanceStatus>
<stepIteration>1</stepIteration>
<stepId>S3</stepId>
<stepName>Order Receipt</stepName>
<subprocessDeploymentVersion>2</subprocessDeploymentVersion>
</stepInstance>
</stepInstances>
<totalCount>1</totalCount>
</results>
Stage Metric Data
This service returns various aggregated stage metrics for each stage related to the given process. The data is derived from the stage instances that were active during the given time range. Cycle time statistical calculations can be derived from either the optional statsInterval parameter or from the size of the given range.
Time Range | Statistical Interval |
---|---|
<= 12 hours | 1 hour |
<= 2 days | 4 hours |
<= 2 weeks | 1 day |
<= 4 weeks | 1 week |
> 4 weeks | 4 weeks |
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/StageMetrics?processModelId=${processModelId}&startTime=${startTime}&endTime=${endTime}&statsInterval=${statsInterval}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Stage Metrics Result Example
<stageMetrics>
<stageMetric>
<cancelOnBreach>false</cancelOnBreach>
<condition>GREATER_THAN</condition>
<conditionDuration>30000</conditionDuration>
<cycleTimeAverage>32862</cycleTimeAverage>
<endMilestone>Good Credit (S12).Complete</endMilestone>
<stageDescription>stage 1</stageDescription>
<stageId>18227992-9deb-46b3-b0f7-618ffa2948a5</stageId>
<stageName>stage1</stageName>
<startMilestone>Validate Credit (S6).Start</startMilestone>
<volumeBreached>160</volumeBreached>
<volumeCompleted>1160</volumeCompleted>
<volumeIncomplete>0</volumeIncomplete>
<volumeRunning>0</volumeRunning>
<volumeStarted>1160</volumeStarted>
</stageMetric>
<stageMetrics>
Stage Volumes
This service returns stage execution metrics by stage for the specified process and time range. The metrics consist of counts for sages started, running and complete during the specified time range.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/StageVolumes?processModelId=${processModelId}&startTime=${startTime}&endTime=${endTime}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Stage Volume Result Example
<stageVolumes>
<stageVolume>
<stageId>9abc537f-7c19-4d8e-80f2-f2f778e319ad</stageId>
<stageName>AcceptOrderStart-EndOfTheProcess</stageName>
<volumeCompleted>2</volumeCompleted>
<volumeIncomplete>1</volumeIncomplete>
<volumeRunning>1</volumeRunning>
</StageVolume>
<StageVolume>
<stageId>8d127d72-63a2-41b0-abce-e987e8405e42</stageId>
<stageName>FindCustomerInfoComplete-ValidateInventoryComplete</stageName>
<volumeCompleted>1</volumeCompleted>
<volumeIncomplete>0</volumeIncomplete>
<volumeRunning>0</volumeRunning>
</StageVolume>
</stageVolumes>
Stage Tracking Errors
This service returns a count of stage tracking errors, also known as breaches, that occurred for a specified process and time range. Counts are grouped by stage.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/StageErrors?processModelId=${processModelId}&startTime=${startTime}&endTime=${endTime}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Stage Errors Result Example
<stageErrors>
<stageError>
<errorCount>160</errorCount>
<stageId>18227992-9deb-46b3-b0f7-618ffa2948a5</stageId>
<stageName>stage1</stageName>
</stageError>
</stageErrors>
Stage Cycle Times
This service returns aggregated stage cycle time data for each stage related to the specified process and time range. The data is derived from the stage' instances that were completed during the given time range. Cycle time statistical calculations can be derived from either the optional statsInterval parameter or from the size of the given range.
Time Range | Statistical Interval |
---|---|
<= 12 hours | 1 hour |
<= 2 days | 4 hours |
<= 2 weeks | 1 day |
<= 4 weeks | 1 week |
> 4 weeks | 4 weeks |
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/StageCycleTimes?processModelId=${processModelId}&startTime=${startTime}&endTime=${endTime}&statsInterval=${statsInterval}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Stage Cycle Times Result Example
<stageCycleTimes>
<stageCycleTime>
<average>32862.06896551724</average>
<max>37010</max>
<min>7901</min>
<historicalAverage>2001.9</historicalAverage>
<historicalStdDev>109.5</historicalStdDev>
<stageId>18227992-9deb-46b3-b0f7-618ffa2948a5</stageId>
<stageName>stage1</stageName>
</stageCycleTime>
</stageCycleTimes>
Stage Instances
This service returns stage instance data for a specified process and time range. A set of stage model IDs may also be specified. Results may also be filtered by multiple stage statuses: started, completed, incomplete or breached. An "incomplete" status is a defined as a stage that was started but not completed before the process ended. If no status is given, then all stages that were active during the specified time range are returned.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/StageInstances?processModelId=${processModelId}&stageIds=${stageIds}&startTime=${startTime}&endTime=${endTime}&status=${status}&maxResults=${maxResults}
http://localhost:12503/services/rest/api/ProcessAnalytics/StageInstances?
processModelId=ProcessModels/otc_bus_stages&startTime=1407996000000&endTime=
1408049935760&status=
RUNNING,COMPLETE&stageIds=18227992-9deb-46b3-b0f7-618ffa2948a5,67c79edc
-7498-41c9-a695-b646652572cb&maxResults=10
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Stage Instances Result Example
<results>
<stageInstances>
<stageInstance
<cycleTime>37000</cycleTime>
<processInstanceId>Shift=0&type=stages&instance=
2014-08-01T12:01:29.968Z-stagetest1&id=rangeID_00010
IterationID_0000100</processInstanceId>
<stageId>18227992-9deb-46b3-b0f7-618ffa2948a5</stageId>
<stageInstanceId>1875</stageInstanceId>
<stageName>stage1</stageName>
<startTime>2014-05-01T09:46-06:00</startTime>
<startTimeAsJavaEpoch>1398959160000</startTimeAsJavaEpoch>
<endTime>2014-08-01T09:46-06:00</endTime>
<endTimeAsJavaEpoch>1406907960000</endTimeAsJavaEpoch>
<stageState>COMPLETE</stageState>
</stageInstance>
</stageInstances>
</results>
Stage Instances for a Process Instance
This service returns stage instance data for a specified process instance.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/StageInstancesForProcessInstance?processInstanceId=${processInstanceId}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Stage Instances Result Example
<results>
<stageInstances>
<stageInstance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="stageInstance">
<breach>false</breach>
<cycleTime>37000</cycleTime>
<endTime>2014-08-01T12:02-06:00</endTime>
<endTimeAsJavaEpoch>1406916129618</endTimeAsJavaEpoch>
<processInstanceId>2x5rfd</processInstanceId>
<stageId>18227992-9deb-46b3-b0f7-618ffa2948a5</stageId>
<stageInstanceId>355</stageInstanceId>
<stageName>stage1</stageName>
<startTime>2014-08-01T12:01-06:00</startTime>
<startTimeAsJavaEpoch>1406916092618</startTimeAsJavaEpoch>
<stageState>COMPLETE</stageState>
</stageInstance>
</stageInstances>
</results>
Active Process Instance Count for a Point in Time
Returns a count of process instances that were active at the given point in time for a specified process.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/ActiveProcessCountForTime?processModelId=${process
model Id}&time=${time}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Process Count Result Example
<ProcessCount>
<count>23</count>
<processModelId>Order Fulfillment</processModelId>
<processName>Order Fulfillment</processName>
</ProcessCount>
Active Process Instance Count for Time Range
This service returns a count of process instances that were active for a specified process and time range (inclusive). Active process instances are defined as a process instances that were active at any point in the time range:
- Process instances that were started before the time range and ended during the time range.
- Process instances that were started before the time range and ended after the time range.
- Process instances that were started before the time range and are still running.
- Process instances that were started during the time range and ended during the time range.
- Process instances that were started during the time range and ended after the time range.
- Process instances that were started during the time range and are still running.
The URL format is as follows:
http://${optimize
host}:${port}/services/rest/api/ProcessAnalytics/ActiveProcessCountForTimeRange?processModelId=${process
model Id}&startTime=${startTime}&endTime=${endTime}
Input Parameters
The following table describes the input parameters.
|
Output Parameters
The following table describes the output parameters.
|
Process Count Result Example
<ProcessCount>
<count>23</count>
<processModelId>Order Fulfillment</processModelId>
<processName>Order Fulfillment</processName>
</ProcessCount>