Workflow

Use this resource to request the details of a linear taskflow or the details of all linear taskflows in the organization. You can also create, update, or delete a linear taskflow.

GET Request

To request the details of a particular linear taskflow, include the linear taskflow ID or linear taskflow name in the URI. Use one of the following URIs:

/api/v2/workflow/<id>
/api/v2/workflow/name/<name>

If you use the linear taskflow name in the URI and the linear taskflow name includes a space, replace the space with %20. For example:

/api/v2/workflow/name/my%20linear%20taskflow

To request the details of all linear taskflows in the organization, use the following URI:

/api/v2/workflow

Optionally, you can receive the response in simple mode which significantly improves performance. When you enable simple mode, the response does not include the ScheduleId attribute and the email attributes. To receive the response in simple mode, include simpleMode=true in the request. Use the following URI to receive details of all linear taskflows using simple mode:

/api/v2/workflow/?simpleMode=true

GET Response

If successful, returns the workflow object for the requested linear taskflow. Or, if you request the details for all linear taskflows in the organization, returns a workflow object for each linear taskflow in the organization.
Returns an error object if errors occurred.
The workflow object includes the following attributes:

Field

Type

Description

id

Linear taskflow ID.

orgId

Organization ID.

name

Linear taskflow name.

description

Description.

createTime

Time the linear taskflow was created

updateTime

Last time the linear taskflow was updated.

createdBy

User who created the linear taskflow.

updatedBy

User who last updated the linear taskflow.

errorTaskEmail

Object that includes the taskEmail object for error notifications.

id

Included in taskEmail object for errorTaskEmail.
ID.

emails

Included in taskEmail object for errorTaskEmail.
Email address that receives email notification when a task fails to complete.

successTaskEmail

Object that includes the taskEmail object for success notifications.

id

Included in taskEmail object for successTaskEmail.
ID.

emails

Included in taskEmail object for successTaskEmail.
Email address that receives email notification when a task completes successfully

warningTaskEmail

Object that includes the taskEmail object for warning notifications.

id

Included in taskEmail object for warningTaskEmail.
ID

emails

Included in taskEmail object for warningTaskEmail.
Email address that receives email notification when a task completes with errors.

agentId

Agent that runs the task.

runtimeEnvironmentId

Runtime environment used for the task

scheduleId

Schedule associated with the linear taskflow, if any.

preProcessingCmd

Command to run before the task.

postProcessingCmd

Command to run after the task completes.

tasks

Defines each task associated with the linear taskflow. Includes a workflowTask object for each task.

taskId

Included in the workflowTask object.
Task ID.

type

Included in the workflowTask object.
Workflow task type. Returns one of the following codes:
DMASK. Masking task.
DRS. Replication task.
DSS. Synchronization task.
MTT. Mapping task.
PCS. PowerCenter task

name

Included in the workflowTask object.
Task name.

stopOnError

Included in the workflowTask object.
Stops the linear taskflow if a task fails to complete

stopOnWarning

Included in the workflowTask object.
Stops the linear taskflow if a task completes with warnings

POST Request

To update a linear taskflow, use the following URI:

/api/v2/workflow/<id>

To create a linear taskflow, omit the optional linear taskflow ID.
When you update a linear taskflow, Data Integration replaces the existing linear taskflow with the update.
You can submit a partial update using partial mode. If you want to update a field in the workflowTask object using partial mode, you must include the taskId field. To submit a request using partial mode, use a JSON request and include the following line in the header:

Update-Mode=PARTIAL

With this URI, you can use the following attributes in the workflow object:

Field

Type

Required

Description

errorTaskEmail

Object that includes the taskEmail object for error notifications.

id

Include in taskEmail object for errorTaskEmail.
ID.

emails

Include in taskEmail object for errorTaskEmail.
Email address that receives email notification when a task fails to complete.

successTaskEmail

Object that includes the taskEmail object for success notifications.

id

Include in taskEmail object for successTaskEmail.
ID.

emails

Include in taskEmail object for successTaskEmail.
Email address that receives email notification when a task completes successfully

warningTaskEmail

Object that includes the taskEmail object for warning notifications.

id

Include in taskEmail object for warningTaskEmail.
ID.

emails

Include in taskEmail object for warningTaskEmail.
Email address that receives email notification when a task completes with errors.

name

Name of the linear taskflow.

description

Description of the linear taskflow.

tasks

Use a workflowTask object to define the following attributes for each task you want to include in the linear taskflow.

taskId

Include in the workflowTask object.
Task ID.

Include in the workflowTask object.
Workflow task type. Use one of the following codes:
DMASK. Masking task.
DRS. Replication task.
DSS. Synchronization task.
MTT. Mapping task.
PCS. PowerCenter task.

name

Include in the workflowTask object.
Name of the task

stopOnError

Include in the workflowTask object.
Stops the linear taskflow if the task fails to complete. Use one of the following options:

  1. True. Stop on error.
  2. False. Do not stop on error.

stopOnWarning

Include in the workflowTask object.
Stops the linear taskflow if a task completes with warnings. Use one of the following options:

  1. True. Stop on error.
  2. False. Do not stop on error.

scheduleId

Schedule for the linear taskflow.

POST Response

If successful, returns the workflow response object for the linear taskflow that you created or updated.
Returns the error object if errors occur.

DELETE Request

To delete a linear taskflow, use the linear taskflow ID in the following URI:

/api/v2/workflow/<id>

DELETE Response

Returns the 200 response code if the request is successful.
Returns the error object if errors occur

POST Example

To update an existing linear taskflow with an ID of 0000342J0000K, you might use the following request:

POST <serverUrl>/api/v2/workflow/0000342J0000K 
Content-Type: application/json
Accept: application/json
icSessionId: <icSessionId>

{
"@type": "workflow",
"name": "linear taskflow",
"tasks":[{ 
"@type":"workflowTask",
"taskId":"0000100I00000000001G",
"type":"DSS",
"name":"DSS_DQ5",
"stopOnError":"false"
},{
"@type":"workflowTask",
"taskId":"0000100Z0000000000B8",
"type":"MTT",
"name":"CIT_SimpleTemplate2",
"stopOnError":"false"
},{
"@type":"workflowTask",
"taskId":"0000100G000000000002",
"type":"DRS",
"name":"SF2File",
"stopOnError":"false"
}]
}

A successful request returns the workflow object that you updated.