Flow definition operations (POST, DELETE)

Description

URL

scheme://domain:port/platform/ws/flow/definitions/submit

scheme://domain:port/platform/ws/flow/definitions/publish

scheme://domain:port/platform/ws/flow/definitions/unpublish

scheme://domain:port/platform/ws/flow/definitions/hold

scheme://domain:port/platform/ws/flow/definitions/release

scheme://domain:port/platform/ws/flow/definitions/commit

scheme://domain:port/platform/ws/flow/definitions/{flowname}

Description

Flow definition operations APIs:

  • /platform/ws/flow/definitions/submit: Trigger flow definitions on PM server side.
  • /platform/ws/flow/definitions/publish: Publish flow definitions on PM server side.
  • /platform/ws/flow/definitions/unpublish: Unpublish flow definitions on PM server side.
  • /platform/ws/flow/definitions/hold: Hold flow definitions on PM server side.
  • /platform/ws/flow/definitions/release: Release flow definitions from PM server side.
  • /platform/ws/flow/definitions/commit: Commit a flow definition to PM server.
  • /platform/ws/flow/definitions/{flowname}: Delete a flow definition from the PM server side.

HTTP Method

DELETE for /platform/ws/flow/definitions/{flowname} API

POST for all other operation APIs

Parameters

API

Name

Description

submit, publish, unpublish, hold, release

flownames

Flow name with owner, owner:name. Supports multiple flow names, split by comma (,).

submit

variables

Optional. Input variables, split by semicolon (;).

commit

filepath

Flow definition xml full file path on PM server side.

comment

Optional. Flow definition commit comment.

version

Optional. Flow definition commit version number.

/platform/ws/flow/definitions/{flowname} (delete API)

force

Optional. Force delete of the flow definition on PM server side.

This parameter is the same as the PM java API. When set in the request the API will remove the flow definition even if the flow contains work items with dependent proxies in other flows.

Request

Request

Request Information

Method

DELETE for /platform/ws/flow/definitions/{flowname} API

POST for all other flow definition operation APIs

Request-URI

/platform/ws/flow/definitions/{operation}

Request-Header

Name

Value

Accept

application/xml or application/json

Message-Body

  1. flownames=%s&variables=%s
  2. flownames=%s
  3. filepath=%s&comment=%s&version=%s
  4. flownames=%s&force=%s

Response

Response Code

  • 200 Successful: Request was successful.
  • 204 Deleted: Successfully deleted the flow definitions in PM server side.
  • 400 Bad Request: The request is not valid.
  • 403 Forbidden: Access restricted by role-based access control permissions.
  • 404 Not Found: No flow definitions that match the specified criteria found.
  • 500 Internal Server Error: Exception occurred

Response-Header

Name

Value

Content-Type

application/xml or application/json

Message-body

Success Message
{
  {
    "message": {
        "message": "%s"
    }
}
Failure Message

If not successful, returns an error message.

{
    "error": {
        "message": "%s"
    }
}

Example: Publish flows

# RequestPOST /platform/ws/flow/definitions/publish
Accept: application/json;
flownames=jsmith:flow1,jsmith:flow2

# Response
200 Successful
Content-Type: application/json;
{
    "message": {
        "message": "Flow <jsmith:flow1> is published. Flow <jsmith:flow2> is published."
    }
}

The message follows the job APIs, joins all single messages to a buffer and then returns. Successful messages or failed messages are all in the whole message.

# Request
POST /platform/ws/flow/definitions/publish
Accept: application/xml;
flownames=jsmith:flow1,jsmith:flow2


# Response
200 Successful
Content-Type: application/xml;
<message>
        <message> Flow <jsmith:flow1> is published. Flow <jsmith:flow2> is published.</message>
</message>