Process Model REST API Services

This section lists and explains the services within the Process Model section of the Optimize REST Services API. This API provides definition information for processes, steps and stages.

Process Model List

This service returns a list of process models that are deployed to the Optimize Analytic Engine. Each process model includes process definition information.

The URL format is as follows:

http://${optimize host}:${port}/services/rest/api/ProcessModels/Processes

Output Parameters

The following table describes the output parameters.
processModelId Returns the identifier of the process model.
modelName Returns the name given to the process model.
processPath Returns the process model path.
description Returns the description provided for the model.
modelVersion Returns the version of the model. Values are “BAM or “BPM”.
modelType Returns the process model type, either "BAM" or "BPM".
createdBy Returns the name of the process model author.
deploymentVersion Returns the descriptive version of the process model.
deploymentTime Returns the deployment time as an ISO 8601 date.
deploymentTimeAsJavaEpoch Returns the deployment time as Java epoch.
executionEnabled Returns “TRUE” or “FALSE” to indicate whether the process model execution is enabled.
instanceLogging Returns “TRUE” or “FALSE” to indicate whether instance logging is enabled.
runningInstancesExist Returns “TRUE” or “FALSE” to indicate whether running process models exist.
thresholdNumber Returns the number used to notify the user when data archiving should be performed.
trackingEnabled Returns “TRUE” or “FALSE” to indicate whether process tracking is enabled.

Process Models Result Example

<processModels>         
   <processModel>         
      <processModelId>MyModels/Order Fulfillment</processModelId>         
      <modelName>Order Fulfillment</modelName>         
      <processPath>MyModels</processPath>         
      <description>Process for order fulfillment</description>         
      <modelVersion>Production</modelVersion>         
      <modelType>BAM</modelType>         
      <createdBy>john doe</createdBy>         
      <deploymentVersion>1</deploymentVersion>         
      <deploymentTime>2014-08-05T15:33-06:00</deploymentTime>         
      <deploymentTimeAsJavaEpoch>1407274405067</deploymentTimeAsJavaEpoch>         
      <executionEnabled>false</executionEnabled>         
      <instanceLogging>false</instanceLogging>         
      <runningInstancesExist>false</runningInstancesExist>         
      <thresholdNumber>1</thresholdNumber>         
      <trackingEnabled>true</trackingEnabled>         
   </processModel>         
</processModels>

Process Steps

This service returns a list of process steps for a specified process model. Each step includes process definition information.

The URL format is as follows:

http://${optimize host}:${port}/services/rest/api/ProcessModels/Steps?processModelId=${processModelId}&version=${version}

Input Parameters

The following table describes the input parameters.
processmodelId String. The identifier of the process model. This attribute is required.
version Integer. The deployment version of the process model. This attribute is required.

Output Parameters

The following table describes the output parameters.
stepId Returns the process model step identifier.
stepName Returns the process model step name.

Step Models Result Example

<stepModels>             
   <stepModel>             
      <stepId>S3</stepId>             
      <stepName>Order Receipt</stepName>             
   </stepModel>             
   <stepModel>             
      <stepId>S6</stepId>             
      <stepName>Find Customer Info</stepName>             
   </stepModel>             
   <stepModel>             
      <stepId>S14</stepId>             
      <stepName>Validate Credit</stepName>             
   </stepModel>             
   <stepModel>             
      <stepId>S20</stepId>             
      <stepName>Book Shipment</stepName>             
   </stepModel>             
   <stepModel>             
      <stepId>S17</stepId>             
      <stepName>Accept Order</stepName>             
      </StepModel>             
   <stepModel>             
      <stepId>S27</stepId>             
      <stepName>Validate Inventory</stepName>             
   </stepModel>             
</stepModels>

Process Stages

This service returns a list of process stages for a specified process. Each stage includes definition information.

The URL format is as follows:

http://${optimize host}:${port}/services/rest/api/ProcessModels/Stages?processModelId=${processModelId}&version=${version}

Input Parameters

The following table describes the input parameters.
processmodelId String. The identifier of the process model. This attribute is required.
version Integer. The deployment version of the process model. This attribute is required.

Output Parameters

The following table describes the output parameters.
stageId Returns the process model stage identifier.
stageName Returns the process model stage name.
stageDescripion Returns the process model stage description.
cancelOnBreach Returns “TRUE” or “FALSE” to indicate whether a breach cancels process instance tracking.
stageCondition Returns the stage condition. Values are “LESS_THAN” or “GREATER_THAN”.
conditionDuration Returns the stage condition duration.
endMilestone Returns the end milestone name.
endMilestoneStepName Returns the end milestone step name.
startMilestone Returns the start milestone name.
startMilestoneStepName Returns the start milestone step name.

Stage Models Result Example

<stageModels>             
   <stageModel>             
      <stageId>1fa2ac94-169e-40a8-967a-7c07e98eb8e5</stageId>             
      <stageName>ValidateCreditComplete-EndOfTheProcess</stageName>             
      <stageDescription>Validate Credit Complete</stageDescription>             
      <cancelOnBreach>false</cancelOnBreach>             
      <stageCondition>LESS_THAN</stageCondition>             
      <conditionDuration>5000</conditionDuration>             
      <endMilestone>PROCESS.0.COMPLETED</endMilestone>             
      <endMilestoneStepName>End of process</endMilestoneStepName>             
      <startMilestone>STEP.S14.COMPLETED</startMilestone>             
      <startMilestoneStepName>Validate Credit (S14).Complete 
      </startMilestoneStepName>             
   </stageModel>             
</stageModels>