Process Engine REST Service Reference

REST Service URL

The format for Process Engine REST Service resource URIs is as follows:

    http://host:port/{context}/{servlet}/p8/bpm/v1/

Where:

The REST Service version identification (/v1) enables subsequent updates to the REST Service.

Resources

The REST Service resources are as follows:

Refer also to the JSON Representation for Step Elements.



Current User

    /p8/bpm/v1/currentuser

Description

The name and ID of the current user in the application space.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/currentuser

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "description":"Contains the name and ID of the current user.",
  "properties": 
  {
    "name":{"type":"string","description":"Current user name."},
    "id":{"type":"long","description":"Associated user ID."}   
  }		
}

Response Example

{ 
  "name":"elijah",
  "id":"23"
}

Error Codes

Code Description
200 OK. Successful completion - requested data returned.
500 Internal Server Error. Severe problem, programmer's details provided.



Launch Step Element

    /p8/bpm/v1/rosters/{rosterName}/workclasses/{workclassName}/wob/{wobNum}

Description

The workflow launch step element. This resource is returned in the POE-Links parameter of the Workclass.Get response header when the POE parameter in the request header is 1 (POE:1).

Path Elements

Name Type Description
rosterName String The name of the roster used for the workflow.
workclassName String The name of the workclass (workflow).
wobNum String The GUID identifying the work object (the workflow launch step element).

Application HTTP Methods

POST

Launches the specified workclass (workflow). The client must use the structure retrieved via the WorkClass.GET operation.

For the POST operation to be successful, it must be the first POST for the work object (the workflow launch step element).

The initial POST of the payload, if successful, returns 201 Created. Subsequent POST operations will return:

    405 Not Allowed
    Allow: Get

A GET operation on this resource will return the JSON representation of the workflow launch step element as it was created by the POST operation.

Parameters

None.

Request Header

Required? Name Description
required POE This value must be set to 1. If this value is not present, a 400 Bad Request error will be returned.

Request Content

MIME Type: application/json

Refer to the response JSON Schema for Step Elements.

If the launch step element has responses, the selectedResponse value must be set; otherwise a 400 Bad Request will be returned.

Request Example

    POST http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/rosters/myRoster/workclasses/myWorkclass/wob/12345

Response Content

MIME Type: application/json

Refer to the response JSON Schema for Step Elements.

Response Example

Refer to Step Elements Response Example.

Error Codes

Code Description
201 Created Successful completion - workflow is launched.
400 Bad Request Missing selectedResponse, or there was no request content.
404 Not Found The specified workclass (workflow) was not found.
405 Not Allowed A subsequent POST to this resource was attempted.
500 Internal Server Error Severe problem, programmer's details provided.

GET

Gets the JSON representation of the workflow launch step element as it was created by the POST operation on this resource.

Parameters

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/rosters/myRoster/workclasses/myWorkclass/wob/12345

Response Content

If the work object (the workflow launch step element) is found and active, a response code of 200 OK is returned with the JSON representation of the workflow launch step element in its current state in the roster.

MIME Type: application/json

Refer to the response JSON Schema for Step Elements.

Response Example

Refer to Step Elements Response Example.

Error Codes

Code Description
200 OK Successful completion - requested data returned.
410 Gone The workclass (workflow) has been terminated or deleted.
500 Internal Server Error Severe problem, programmer's details provided.



Queue Elements

    /p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/queueelements/?{queryParams}

Description

The set of queue elements in a workbasket.

Path Elements

Name Type Description
queue String The name of the queue with which the workbasket is associated.
workbasket String The name of the workbasket.
queryParams n/a The set of parameters specifying the criteria for the query. Refer to the GET parameters for this resource (below).

Application HTTP Methods

GET

Gets the set of queue elements based on the specified query parameters. If the queryParams value is large, use the POST method. Refer to URL Length Limitation for more information.

Parameters

Required? Name Data Type Description
optional filters String A tuple of filter name/value pairs (for example, "[State=CA, City=Costa Mesa]").
optional lastRecord String Indicates the last record returned in the previous query. This value is returned in the response content. Used for paging. Whenever the query filters or orderBy values change, the client should reissue the query without the lastRecord parameter. This parameter should not be specified for the initial query.
optional pageSize Integer The number of items displayed on a page. The server only returns one page at a time. If the page size is not specified it defaults to 50.
optional orderBy String The column to sort by (such as, "AccountNumber"). Only one column can be specified.
optional queryFlags Integer The flags that are to be used for the query. Refer to the QUERY_* attributes in the VWQueue Javadocs for the possible values. If a value is not specified, the default is 0 (zero). This will result in only unlocked work items being returned.

Set this value to 1 to specify that both locked and unlocked work items should be returned.

Request Example

The following example fetches both locked and unlocked work items from the workbasket(queryFlags=1). The results will be filtered by (the filters value) "State=CA" and "City='Costa Mesa'" and ordered by (the orderby value) "State". A maximum of 50 work items at a time will be returned from the server (the pageSize value).

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/queueelements?filters=[State=CA,City=Costa Mesa]&pageSize=50&queryFlags=1&orderBy=State

The client will receive the queue elements in the response from the server. The response also includes a lastRecord value. The following GET retrieves the next 50 work items:

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/queueelements?filters=[State=CA,City=Costa Mesa]&pageSize=50&queryFlags=1&orderBy=State&lastRecord=xxxxx

Response Content

MIME Type: application/json

Note: If there are no queue elements fetched from the server then an empty JSON object ({ }) is returned.

JSON Schema:

{ "type":"object",
  "properties":
  {
    "lastRecord":{"type":"string"},
    "stepProcessors":
    {
      "type":"object",
      "description":"Contains a dynamic set of properties. The property names are the step processor identifiers.",
      "additionalProperties":
      {
        "type":"object",
        "properties":,
        {
          "name":{"type":"string"},
          "id":{"type":"integer"},
          "appType":{"type":"string"},
          "processorType":{"type":"string"},
          "width":{"type":"integer"},
          "height":{"type":"integer"},
          "applicationName":{"type":"string"},
          "locations":
          {
            "type":"object",
            "description":"Contains a dynamic set of properties. The property names are the Web application identifiers. The value of each property is the step processor location for that Web application.",
            "additionalProperties":{"type":"string"}
          }
        }
      }
    }
    "queueElements":
    {
      "type":"array",
      "items":
      {
        "type":"object",
        "properties":
        {
          "stepElement":{"type":"string" ,"format":"uri"},
          "Etag":{"type":"string"},
          "workObjectNumber":{"type":"string"},
          "stepName":{"type":"string"},
          "queueName":{"type":"string"},
          "lockedBy":{"type":"string", "description":"Contains the name of the user who has the work item locked."},
          "lockedById":{"type":"integer", "description":"Contains the id of the user who has the work item locked. This will be -1 if the work item is not locked."},
          "stepProcessorId":{"type":"string", "description":"Use this property to look up the step processor information in the stepProcessors property."},
          "columns":
          {
            "type":"object",
            "description":"Contains a dynamic set of properties. The property names are the column names, and the value of each property is the value of that column for the queue element.",
            "additionalProperties":
            {
              "type":["string","number","boolean"]
            }
          }
        }
      }
    }
  }
}

Response Example

{
  "lastRecord":"xxxxxxxxxxxxxx",
  "stepProcessors":
  {
    "1":
    {
      "name":"",
      "id":1,
      "appType":"HTML",
      "processorType":"step",
      "width":500,
      "height":500,
      "applicationName":"",
      "locations":
      { 
        "1":"html/ootb/WcmStepProcessor.jsp",
        "7":"html/ootb/WcmStepProcessor.jsp"
        ...
      }
    },
    ...
  }
  "queueElements":
  [
    {
      "stepElement":"queues/{queue}/{wobnum}",
      "ETag":"xxxx",
      "workObjectNumber","xxx",
      "stepName","Review Step",
      "queueName","ClaimProcessing",
      "lockedBy":"elijah",
      "lockedById":"23",
      "stepProcessorId":1,
      "columns":
      {
        "CustomerName":"John Smith",
        "CustomerAge":35
      }
    }
    ...
  ]
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Queue Elements Count

    /p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/queueelements/count

Description

The number of queue elements in a workbasket. The count is based on a predefined query for the work basket. Query parameters are not supported on this resource.

Path Elements

Name Type Description
queue String The name of the queue with which the workbasket is associated.
workbasket String The name of the workbasket.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/queueelements/count

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "properties":
  {
    "count":{"type":"integer"}
  }
}

Response Example

{"count":50}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



MyRoles

    /p8/bpm/v1/appspaces/{appspace}/myroles

Description

The list of roles within an application space.

Path Elements

Name Type Description
appspace String The name of the application space.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/appspaces/Autoclaim/myRoles

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "description":"Contains a dynamic set of properties. The property names are the authored role names.",
  "additionalProperties": 
  {
    "type":"object",
    "properties":
    {  
      "name":{"type":"string","description":"Translated role name."},
      "URI":{"type":"string","format":"uri"}   
    }
  }		
}

Response Example

{ 
  "Agent":{"name":"Agent","URI":"appspaces/Autoclaim/roles/Agent"},
  "Manager":{"name":"Manager","URI":"appspaces/Autoclaim/roles/Manager"
}

Error Codes

Code Description
200 OK. Successful completion - requested data returned.
500 Internal Server Error. Severe problem, programmer's details provided.



Role

    /p8/bpm/v1/appspaces/{appspace}/roles/{role}

Description

A specific role.

Path Elements

Name Type Description
appspace String The name of the application space.
role String The name of the role.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/appspaces/Autoclaim/roles/Reviewer

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "properties": 
  {  
    "name":{"type":"string"},
    "authoredName":{"type":"string"},
    "description":{"type":"string"},
    "homePage":{"type":"string"}, 
    "attributes":{"type":"string" ,"format":"uri"},
    "workbaskets": 
    {
      "type":"object",
      "description":"Contains a dynamic set of properties. The property names are the authored workbasket names.",
      "additionalProperties":
      {
        "type":"object",
        "properties":
        {
          "name":{"type":"string","description":"Translated workbasket name."},
          "URI":{"type":"string","format":"uri"}
        }
      }	
    }
  }
} 

Response Example

{
  "name":"ReviewerTranslated",
  "authoredName":"Reviewer",
  "description":"Role description",
  "homePage":"AutoClaimReview.html",
  "attributes":"appspaces/AutoClaim/roles/Reviewer/attributes",
  "workbaskets":
  {
    "Initial":{"name":"Initial","URI":"appspaces/AutoClaim/roles/Reviewer/workbaskets/Initial"},
    "Appeal":{"name":"Appeal","URI":"appspaces/AutoClaim/roles/Reviewer/workbaskets/Appeal"}
  }
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Role Attributes

    /p8/bpm/v1/appspaces/{appspace}/myroles/{role}/attributes

Description

Identifies the attributes assigned to a role.

Path Elements

Name Type Description
appspace String The name of the application space.
role String The name of the role.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/appspaces/Autoclaim/roles/Reviewer/attributes

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "additionalProperties": 
  {  
    "type":"object",
    "description":"Contains a dynamic set of properties. The property names are the attribute names.",
    "properties":
    {
      "name":{"type":"string"},
      "type":{"type":"integer",, "description":"VWFieldType"},
      "isArray":{"type":"boolean"},
      "value":{"type":["string","number", "boolean", "array"]}
    }
  }
}

Response Example

{
  "Color":
  {
    "name":"Color",
    "type":2,
    "isArray":false,
    "value":"Red"
  }
  "Colors":
  {
    "name":"Colors",
    "type":2,
    "isArray":true,
    "value":["Red","Blue","Green"]
  }
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Step Element

    /p8/bpm/v1/queues/{queueName}/stepelement/{wobNum}

Description

A step element retrieved from a queue.

Path Elements

Name Type Description
queueName String The name of the queue with which the step element is associated.
wobNum String The GUID identifying the work object (the step element).

Application HTTP Methods

GET

Gets the JSON representation of the step element.

Parameters

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/myqueue/stepelement/12345

Response Header

Name Description
ETag Identifies the version of the step element. Return this value as the HTTP request header If-Match value when performing a PUT on this resource.

Response Content

MIME Type: application/json

Refer to the response JSON Schema for the Step Element.

Response Example

Refer to Step Element Response Example.

Error Codes

Code Description
200 OK Successful completion - requested data returned.
404 Not Found Work item not found.
500 Internal Server Error Severe problem, programmer's details provided.

PUT

Updates a step element.

Parameters

Required? Name Data Type Description
required action String One of the following values:
  • lock

    Locks the work item.

  • overrideLock

    Locks the work item. If the work item is already locked, the current lock will be overridden.

  • save

    Updates the work item and leaves it locked. In the request content, send the updated version of the representation returned in the GET response.

  • saveAndUnlock

    Updates the work item and unlocks it. In the request content, send the updated version of the representation returned in the GET response.

  • abort

    Unlocks the work item without making any updates.

  • dispatch

    Updates the work item, unlocks it, and advances the work item in the workflow. In the request content, send the updated version of the representation returned in the GET response.

optional responseContent integer This parameter is valid only when the action parameter is "lock" or "overrideLock". It provides a mechanism to allow a client to lock a work item and fetch its representation in a single call.

A value of 1 indicates that the current representation of the step element is to be returned in the response content. The step element representation is not included in the response content (the default) when this parameter is not specified, or when its value is other than "lock" or "overrideLock".

Request Header

Required? Name Description
required If-Match Identifies the version of the step element. This must be the ETag value returned in the GET response header.

Request Content

For save, saveAndUnlock, and dispatch actions, send an updated version of the representation returned in the GET response. No request content is needed for the other actions.

If responses are required for the step, the step element responses property will contain an array of possible responses. Set the selectedResponse property before dispatching the work item.

Set the modified property to true for any dataField, attachment, or workflow group values that have been modifed. If the modified property is not set, the updated value will not be saved on the server.

MIME Type: application/json

Refer to the response JSON Schema for Step Elements.

Request Example

    PUT http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/myqueue/stepelement/12345?action=overrideLock?responseContent=1

Response Header

Required? Name Description
required ETag The new identifying version of the work item. Return this value as the If-Match request header value when updating the step element.

Response Content

No content is returned, unless the the action is "lock" or "overrideLock" and the responseContent parameter is set to 1. In this case, the current representation of the step element will be returned.

MIME Type: application/json

Refer to the response JSON Schema for Step Elements.

Response Example

Refer to Step Element Response Example.

Error Codes

Code Description
201 Created Successful completion - workflow is launched.
404 Not Found Work item not found.
409 Conflict The If-Match request header value does not match the current ETag response header value for the step element. This indicates the step element was modified since the last time the its representation was retrieved.
500 Internal Server Error Severe problem, programmer's details provided.



Workbasket

    /p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}

Description

The name of an available work basket for the specified queue.

Path Elements

Name Type Description
queue String The name of the queue with which the workbasket is associated.
workbasket String The name of the workbasket.

Application HTTP Methods

GET

Gets the workbasket. The returned workbasket includes columns defining the workbasket, as well as information for queue query and filtering.

Parameters

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/myQueue/workbaskets/myWorkbasket

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "properties":
  {  
    "name":{"type":"string"},  
    "authoredName":{"type":"string"},
    "description":{"type":"string"}, 
    "columns": 
    {
      "type":"object",
      "description":"Contains a dynamic set of properties. The property names are the authored column names.",
      "additionalProperties":
      {	  
        "type":"object",
        "properties":
        {
          "name":{"type":"string","description":"Translated column name."}
          "type":{"type":"integer","description":"VWFieldType"},
          "prompt":{"type":"string"},
          "sortable":{"type":"boolean"},
          "ordinal":{"type":"integer"}
        }
      }		
    }
    "filters" : 
    {
      "type":"object",
      "additionalProperties":
      {
        "type":"object",
        "properties":
        {
          "name":{"type":"string"},
          "prompt":{"type":"string"},
          "description":{"type":"string"},
          "type":{"type":"integer"},
          "operator":{"type":"integer"},
          "attributes":{"type":"string" ,"format":"uri"}
        }
      }
    }
    "attributes":{"type":"string","format":"uri"},
    "queueElements":{"type":"string","format":"uri"},
    "queueElementsCount":{"type":"string", "format":"uri"}
  }	
}

Response Example

{
  "name":"myWorkbasketTranslated", 
  "authoredName":"myWorkbasket",
  "description":"Workbasket description",
  "columns": 
  {
    "integerCol":
    {
      "name":"integerCol", 
      "prompt":"Integer Column", 
      "type":1,
      "sortable":true,
      "ordinal":0
    },
  },
    "filters":
    {
      "integerCol":
      {
        "name":"integerCol", 
        "prompt":"Integer Column", 
        "description":"Filter description",
        "type":1,
        "operator":0,
        "attributes":"queues/myQueue/workbaskets/Initial/filters/CompanyName/attributes"
      },
    },
  "attributes":"queues/myQueue/workbaskets/myWorkbasket/attributes",
  "queueElements":"queues/myQueue/workbaskets/myWorkbasket/queueelements",
  "queueElementsCount":"queues/myQueue/workbaskets/myWorkbasket/queueelements/count"
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Workbasket Attributes

  /p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/attributes

Description

The attributes of an available work basket for the specified queue.

Path Elements

Name Type Description
queue String The name of the queue with which the workbasket is associated.
workbasket String The name of the workbasket.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/myQueue/workbaskets/myWorkbasket/attributes

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "description":"Contains a dynamic set of properties. The property names are the attribute names.",
  "additionalProperties": 
  {  
    "type":"object",
    "properties":
    {
      "name":{"type":"string"},
      "type":{"type":"integer"},
      "isArray":{"type":"boolean"},
      "value":{"type":["string", "number", "boolean", "array"]}
    }
  }
}

Response Example

{
  "Color":
  {
    "name":"Color",
    "type":2,
    "isArray":false,
    "value":"Red"
  }
  "Colors":
  {
    "name":"Colors",
    "type":2,
    "isArray":true,
    "value":["Red","Blue","Green"]
  }
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Workbasket Columns

    /p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/columns

Description

The column definitions for the workbasket. Call this resource when a widget only needs the columns and not the entire workbasket definition (as returned by Workbasket.GET).

Path Elements

Name Type Description
queue String The name of the queue with which the workbasket is associated.
workbasket String The name of the workbasket.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/myQueue/workbaskets/myWorkbasket/columns

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "description":"Contains a dynamic set of properties. The property names are the authored column names.",
  "additionalProperties": 
  {
    "type":"object",
    "properties":
    {  
      "name":{"type":"string","description":"Translated column name."}
      "type":{"type":"integer","description":"VWFieldType"},
      "prompt":{"type":"string"},
      "sortable":{"type":"boolean"},
      "ordinal":{"type":"integer"}
    }	
  }		
}

Response Example

{
  "integerCol":{"name":"integerCol", "prompt":"Integer Column", "type":1, "sortable":true},
  "stringCol":{"name":"stringCol", "prompt":"String Column", "type":2, "sortable":false}
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Workbasket Filters

    /p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/filters

Description

The filter definitions for the work basket. Call this resource when a widget only needs the filters and not the entire workbasket definition (as returned by Workbasket.GET).

Path Elements

Name Type Description
queue String The name of the queue with which the workbasket it associated.
workbasket String The name of the workbasket.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/myQueue/workbaskets/myWorkbasket/filters

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "description":"Contains a dynamic set of properties. The property names are the authored filter names.",
  "additionalProperties":
  {	  
    "type":"object",
    "properties":
    {
      "name":{"type":"string","description":"Translated filter name."}
      "type":{"type":"integer","description":"VWFieldType"},
      "prompt":{"type":"string"},
      "attributes":{"type":"string","format":"uri"}
    }
  }		
}

Response Example

{
  "integerCol":
  {
    "name":"integerCol", 
    "type":1,
    "operator":0,
    "prompt":"Integer Column",
    "description":"Filter description",
    "attributes":"queues/myQueue/workbaskets/MyWorkbasket/filters/CompanyName/attributes"
  }
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Workbasket Filter Attributes

    /p8/bpm/v1/queues/{queue}/workbaskets/{workbasket}/filters/{filter}/attributes

Description

The attributes of a filter defined for the work basket.

Path Elements

Name Type Description
queue String The name of the queue with which the workbasket is associated.
workbasket String The name of the workbasket.
filter String The name of the filter.

Application HTTP Methods

GET

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/queues/myQueue/workbaskets/myWorkbasket/filters/CompanyName/attributes

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "description":"Contains a dynamic set of properties. The property names are the attribute names.",
  "additionalProperties": 
  {  
    "type":"object",
    "properties":
    {
      "name":{"type":"string"},
      "type":{"type":"integer"},
      "isArray":{"type":"boolean"},
      "value":{"type":["string", "number", "boolean", "array"]}
    }
  }
}

Response Example

{
  "Color":
  {
    "name":"Color",
    "type":2,
    "isArray":false,
    "value":"Red"
  }
  "Colors":
  {
    "name":"Colors",
    "type":2,
    "isArray":true,
    "value":["Red","Blue","Green"]
  }
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Workclasses

    /p8/bpm/v1/workclasses

Description

The collection of work classes (workflows) available.

Path Elements

None.

Application HTTP Methods

GET

Gets the list of work classes that can be launched.

Parameters

None.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/workclasses

Response Content

MIME Type: application/json

JSON Schema:

{ "type":"object",
  "description":"Contains a dynamic set of properties. The property names are the workclass names.",
  "additionalProperties":
  {
    "type":"object",
    "properties":
    {
      "URI":{"type":"string" ,"format":"uri"},
      "name":{"type":"string"}
    }
  }
}

Response Example

{
  "QFieldTestWithResponseAndDeadlines":
  {
    "URI":"workclasses/QFieldTestWithResponseAndDeadlines",
    "name":"QFieldTestWithResponseAndDeadlines"	},
  "QFieldTest":
  {
    "URI":"workclasses/QFieldTest","name":"QFieldTest"	}
  }
}

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.



Workclass

    /p8/bpm/v1/workclasses/{workclassName}

Description

The workclass (workflow) representation. This is the collection of workflow properties, parameters, attachments, and workflow groups.

Path Elements

Name Type Description
workclassName String The name of an available workclass (workflow).

Application HTTP Methods

GET

Gets the fields for the work class launch step. When called with the POE parameter set to 1 (POE:1) in the request header, the value of the POE-Links parameter in the response header will be the workclass launch step resource that can be used to launch the workflow. If the POE parameter is set to any value other than 1, this parameter is ignored.

Parameters

None.

Request Header

Required? Name Description
optional POE Set this parameter to a value of 1 (POE:1) to retrieve the launch step element information. The launch step element resource is returned in the POE-Links parameter in the response header.

Request Example

    GET http://restHost:8000/myContext/P8BPMRESTAPI/p8/bpm/v1/workclasses/myWorkclass

Response Header

Name Value Description
POE-Links (The launch step resource. See Launch Step Element. The identifying work object number for the workclass launch step. This information is returned in the response header if the optional POE parameter is set to a value of one (POE:1).

Response Content

MIME Type: application/json

Refer to the response JSON Schema for Step Elements.

Response Example

Refer to Step Elements Response Example.

Error Codes

Code Description
200 OK Successful completion - requested data returned.
500 Internal Server Error Severe problem, programmer's details provided.

JSON Representation for Step Elements

The Step Element and Launch Step Element resources have a common JSON schema for response content. The Launch Step Element POST request content also shares this schema.

The responses property on the systemProperties object will be an empty array if a response is not required for the step. In this case, the selectedResponse property will not be present.

If a step does require a response, responses property will contain an array of the response names, and the selectedResponse property will be present. The client should set the selectedResponse property to one of the values returned in the responses property before sending the step element object back to the server to be saved or dispatched.

Some properties on the systemProperties object are not applicable to Launch Step Element, and are present only in the Step Element systemProperties content. These properties are:

{ "type":"object",
  "propeties":
  {
    "systemProperties":
    {
      "type":"object",
      "properties":
      {
        "workflowName":{"type":"string"},
        "subject":{"type":"string"},
        "instruction":{"type":"string"},
        "stepName":{"type":"string"},
        "deadline":{"type":"string","description":"In Step Element Only"},
        "launchDate":{"type":"string","format":"date-time"},
        "reminder":{"type":"string","format":"date-time"},
        "launchDate":{"type":"string","format":"date-time"},
        "overdueStatus":{"type":"integer", "enum":[0,1,2]},
        "originator":{"type":"string"},
        "sourceDoc":{"type":"string"},
        "workObjectNumber":{"type":"string"},
        "workflowNumber":{"type":"string"},
        "comment":{"type":"string"},
        "lockedBy":{"type":"string", "description":"Contains the name of the user who has the work item locked."},
        "lockedById":{"type":"integer", "description":"Contains the id of the user who has the work item locked. This will be -1 if the work item is not locked."},
        "responses":
        {
          "type":"array",
          "items":{"type":"string"}
        }
        "selectedResponse":{"type":"string"}   
      }
    }
    "dataFields":
    {
      "type":"object",
      "description":"Contains a dynamic set of properties. The property names are the authored data field names.",
      "additionalProperties":
      {
        "type":"object",
        "properties":
        {
          "name":{"type":"string","description":"Translated data field name."},
          "type":{"type":"integer","description":"VWFieldType"},
          "isArray":{"type":"boolean"},
          "mode":{"type":"integer","description":"VWModeType"},
          "desc":{"type":"string"},
          "modified":{"type":boolean","description":"When a client modifies a data field it should set this property to true."},
          "value":{"type":["string","number","boolean","array"]}
        }
      }
    }
    "attachments":
    {
      "type":"object",
      "description":"Contains a dynamic set of properties. The property names are the authored attachment names.",
      "additionalProperties":
      {
        "type":"object",
        "properties":
        {
          "name":{"type":"string","description":"Translated attachment name."},
          "type":{"type":"integer","description":"VWFieldType"},
          "isArray":{"type":"boolean"},
          "mode":{"type":"integer","description":"VWModeType"},
          "desc":{"type":"string"},
          "modified":{"type":boolean","description":"When a client modifies an attachment it should set this property to true."},
          "value":
          {
            "type":["object","array"],
            "properties":
            {
              "title":{"type":"string"},
              "desc":{"type":"string"},
              "libraryName":{"type":"string"},
              "libraryType":{"type":"integer"},
              "type":{"type":"integer"},
              "vsId":{"type":"string"},
              "version":{"type":"string"}
            }
          }	
        }
      }
    }
    "workflowGroups":
    {
      "type":"object",
      "description":"Contains a dynamic set of properties. The property names are the authored workflow group names.",
      "additionalProperties":
      {
        "type":"object",
        "properties":
        {
          "name":{"type":"string","description":"Translated workflow group name."},
          "type":{"type":"integer","description":"VWFieldType"},
          "isArray":{"type":"boolean"},
          "mode":{"type":"integer""description":"VWModeType"},
          "desc":{"type":"string"},
          "modified":{"type":boolean","description":"When a client modifies a workflow group it should set this property to true."},
          "value":
          {
            "type":"array",
            "items":{"type":"string"}
          }
        }
      }
    }
    "stepProcessor":
    {
      "type":"object",
      "properties":,
      {
        "name":{"type":"string"},
        "id":{"type":"integer"},
        "appType":{"type":"string"},
        "processorType":{"type":"string"},
        "width":{"type":"integer"},
        "height":{"type":"integer"},
        "applicationName":{"type":"string"},
        "locations":
        {
          "type":"object",
          "description":"Contains a dynamic set of properties. The property names are the web application identifiers. The value of each property is the step processor location for that web application.",
          "additionalProperties":{"type":"string"}
        }
      }
    }
  }
}

Step Elements Response Example

"systemProperties":
{
  "workflowName":"QFieldTest",
  "subject":"QFieldTest",
  "instruction":"",
  "stepName":"LaunchStep",
  "deadline":"2008-01-13T19:49:00Z",
  "reminder":"2008-02-13T19:49:00Z",
  "launchDate":"2008-03-13T19:49:00Z",
  "overdueStatus":1,
  "originator":"jsmith",
  "sourceDoc":"",
  "workObjectNumber":"",
  "workflowNumber":"",
  "comment":"This is a cool step",
  "lockedBy":"elijah",
  "lockedById":"23",
  "responses": ["Yes","No"]
  "selectedResponse":"Yes"
}
"attachments":
{
  "supportingDocs":
  {
    "name":"supportingDocs",
    "value":
    [
      {
        "title":"Credit Report1",
        "desc":"",
        "libraryName":"peru",
        "libraryType":3,
        "type":3,
        "vsId":"{F34061E3-ACB4-4223-B7B9-0F173F72DD15}",
        "version":"-1"
      },
      {
        "title":"Bank Statement1",
        "desc":"",
        "libraryName":"peru",
        "libraryType":3,
        "type":2,
        "vsId":"{70E15871-20AF-4784-9307-797CA0618C5C}",
        "version":""
      }
    ],
    "type":32,
    "isArray":true,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "application":
  {
    "name":"application",
    "value":{},
    "type":32,
    "isArray":false,
    "mode":1,
    "desc":""
  }
}
"dataFields":
{
  "QBool":
  {
    "name":"QBool",
    "value":true,
    "type":4,
    "isArray":false,
    "mode":1,
    "desc":""
  },
  "QString":
  {
    "name":"QString",
    "value":"red",
    "type":2,
    "isArray":false,
    "mode":2,
    "desc":"",
    "modified":false
  },
  "QFloatArray":
  {
    "name":"QFloatArray",
    "value":[500.0,400.0,300.0,200.0,100.0],
    "type":8,
    "isArray":true,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "QFloat":
  {
    "name":"QFloat",
    "value":3.14,
    "type":8,
    "isArray":false,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "QTime":
  {
    "name":"QTime",
    "value":"2008-07-24T18:56:10-0700",
    "type":16,
    "isArray":false,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "QTimeArray":
  {
    "name":"QTimeArray",
    "value":["2008-07-24T18:56:10-0700","2008-07-24T18:56:10-0700"],
    "type":16,
    "isArray":true,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "QBoolArray":
  {
    "name":"QBoolArray",
    "value":[],
    "type":4,
    "isArray":true,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "QStringArray":
  {
    "name":"QStringArray",
    "value":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
    "type":2,
    "isArray":false,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "QInt":
  {
    "name":"QInt",
    "value":100,
    "type":1,
    "isArray":false,
    "mode":3,
    "desc":"",
    "modified":false
  },
  "QIntArray":
  {
    "name":"QIntArray",
    "value":[0,1,2,3],
    "type":1,
    "isArray":true,
    "mode":3,
    "desc":"",
    "modified":false
  }
}
"workflowGroups":
{
  "QGroup1":
  {
    "name":"QGroup1",
    "value":["QGroup1","QGroup1GParent","QGroup1Parent"],
    "type":64,
    "isArray":true,
    "mode":3,
    "desc":"",
    "modified":false
  }
}
"stepProcessor":
{
  "width":800,
  "processorType":1,
  "height":600,
  "applicationName":"",
  "appType":32,
  "name":"Approval Launch HTML (FileNet)",
  "id":6,
  "locations":
  {
    "7":"html/ootb/LaunchApproval.jsp",
    "1":"html/ootb/LaunchApproval.jsp"
  }
}