Connectors Reference

K2 Workflow

Use the K2 Workflow API service to remotely work with workflows and tasks.

 

Status: Preview

Tier: Standard

Version: v1

 

Actions:

Name

Summary

Operations_Get (string operation)

Get Operations List

ServerEvent_Get (string serialNumber)

Get Server Event

ServerEvent_Finish (string serialNumber, UpdateFieldsRequest userDefinedFields)

Finish Server Event

Tasks_Get ([Optional]string state)

Get Tasks

Tasks_GetTask (string serialNumber)

Get Task

Tasks_GetTaskActions (string serialNumber)

Get Task Actions

Tasks_PostRedirectAction (string serialNumber, UserDefinedRedirect redirectData)

Redirect Task

Tasks_PostSleepAction (string serialNumber, UserDefinedSleep sleepData)

Sleep Task

Tasks_PostReleaseAction (string serialNumber)

Release Task

Tasks_PostWakeAction (string serialNumber)

Wake Task

Tasks_PostAssignAction (string serialNumber)

Assign Task

Tasks_TaskCustomAction (string serialNumber, string customAction, UpdateFieldsRequest userDefinedFields)

Action Task

GetWorkflows ([Optional]string type)

Get Workflows

GetWorkflow (integer id)

Get Workflow

StartWorkflow (integer id, UserDefinedWorkflowInstance instance)

Start Workflow

GetWorkflowSchema (integer id)

Get Workflow Schema

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

EventInstance

 

EventInstanceWrapper

 

ServerEventDataResponse

 

Task

 

TaskActionsResponse

 

TaskLite

 

TasksResponse

 

Tasks_PostAssignActionResponse

 

Tasks_PostWakeActionResponse

 

UpdateFieldsRequest

 

User

 

UserDefinedRedirect

 

UserDefinedSleep

 

UserDefinedWorkflowInstance

 

UserDefinedXmlField

 

WorkflowDataResponse

 

WorkflowDefinition

 

WorkflowLabel

 

WorkflowLabelsResponse[WorkflowLabel]

 

 

Actions:

Operations_Get

Summary: Get Operations List

Description: Use operations to manage the workflow API.

 

Syntax:

K2Workflow.Operations_Get (string operation)

 

Parameters:

Name

Type

Summary

Required

Related Action

operation

string

(Refresh)

The operation to perform.

True

 

Returns:

          Type:string

 

ServerEvent_Get

Summary: Get Server Event

Description: Gets a server event by serial number.

 

Syntax:

K2Workflow.ServerEvent_Get (string serialNumber)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Server Event Serial Number)

The serial number of the server event. Ex: 1234_5678.

True

 

Returns:

          Type:ServerEventDataResponse

 

ServerEvent_Finish

Summary: Finish Server Event

Description: Send a finish response to an async server task awaiting a response

 

Syntax:

K2Workflow.ServerEvent_Finish (string serialNumber, UpdateFieldsRequest userDefinedFields)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Server Event Serial Number)

The serial number of the server event. Ex: 1234_5678

True

userDefinedFields

UpdateFieldsRequest

 

 

True

 

Returns:

 

Tasks_Get

Summary: Get Tasks

Description: Obtain a list of tasks available to the connected user.

 

Syntax:

K2Workflow.Tasks_Get ([Optional]string state)

 

Parameters:

Name

Type

Summary

Required

Related Action

state

string

(All, Allocated, Sleeping, SharedFrom, SharedTo)Values: [All, Allocated, Sleeping]

Returns list of tasks for the connected user.

False

 

Returns:

          Type:TasksResponse

 

Tasks_GetTask

Summary: Get Task

Description: Gets a task by serial number.

 

Syntax:

K2Workflow.Tasks_GetTask (string serialNumber)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

 

Returns:

          Type:Task

 

Tasks_GetTaskActions

Summary: Get Task Actions

Description: Gets a list of actions for the task.

 

Syntax:

K2Workflow.Tasks_GetTaskActions (string serialNumber)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

 

Returns:

          Type:TaskActionsResponse

 

Tasks_PostRedirectAction

Summary: Redirect Task

Description: Sends a task to another person.

 

Syntax:

K2Workflow.Tasks_PostRedirectAction (string serialNumber, UserDefinedRedirect redirectData)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

redirectData

UserDefinedRedirect

 

 

True

 

Returns:

 

Tasks_PostSleepAction

Summary: Sleep Task

Description: Sleeps a task for a duration, either number of seconds or until a date.

 

Syntax:

K2Workflow.Tasks_PostSleepAction (string serialNumber, UserDefinedSleep sleepData)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

sleepData

UserDefinedSleep

 

 

True

 

Returns:

 

Tasks_PostReleaseAction

Summary: Release Task

Description: Releases a task.

 

Syntax:

K2Workflow.Tasks_PostReleaseAction (string serialNumber)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

 

Returns:

 

Tasks_PostWakeAction

Summary: Wake Task

Description: Awakens a sleeping task.

 

Syntax:

K2Workflow.Tasks_PostWakeAction (string serialNumber)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

 

Returns:

          Type:Tasks_PostWakeActionResponse

 

Tasks_PostAssignAction

Summary: Assign Task

Description: Assigns a task to the current user.

 

Syntax:

K2Workflow.Tasks_PostAssignAction (string serialNumber)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

 

Returns:

          Type:Tasks_PostAssignActionResponse

 

Tasks_TaskCustomAction

Summary: Action Task

Description: Performs a workflow action.

 

Syntax:

K2Workflow.Tasks_TaskCustomAction (string serialNumber, string customAction, UpdateFieldsRequest userDefinedFields)

 

Parameters:

Name

Type

Summary

Required

Related Action

serialNumber

string

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

customAction

string

(Custom Action)

The task action, defined by the workflow.

True

userDefinedFields

UpdateFieldsRequest

 

 

True

 

Returns:

 

GetWorkflows

Summary: Get Workflows

Description: Get a list of available workflows.

 

Syntax:

K2Workflow.GetWorkflows ([Optional]string type)

 

Parameters:

Name

Type

Summary

Required

Related Action

type

string

(Workflow Type)Values: [Startable, Owned]

The type of workflow. Startable or Owned.

False

 

Returns:

          Type:WorkflowLabelsResponse[WorkflowLabel]

 

GetWorkflow

Summary: Get Workflow

Description: Gets a workflow definition by ID.

 

Syntax:

K2Workflow.GetWorkflow (integer id)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

integer(int32)

(Workflow ID)

The ID of the workflow.

True

 

Returns:

          Type:WorkflowDataResponse

 

StartWorkflow

Summary: Start Workflow

Description: Creates and starts a new workflow instance.

 

Syntax:

K2Workflow.StartWorkflow (integer id, UserDefinedWorkflowInstance instance)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

integer(int32)

(Workflow ID)

Specify a workflow ID to start instance.

True

GetWorkflows

instance

UserDefinedWorkflowInstance

 

 

True

 

Returns:

          Type:integer(int32)

 

GetWorkflowSchema

Summary: Get Workflow Schema

Description: Gets a workflow JSON schema by ID.

 

Syntax:

K2Workflow.GetWorkflowSchema (integer id)

 

Parameters:

Name

Type

Summary

Required

Related Action

id

integer(int32)

(Serial Number)

The serial number of the task. Ex: 1234_5678

True

 

Returns:

 


 

EventInstance

Summary:

Description:

 

          Properties:

Name

Type

Summary

StartDate

string(date-time)

Event Instance Start Date

Date and time the event instance started.

ExpectedDuration

integer(int32)

Event Instance Expected Duration

Expected duration of the event instance.

Priority

integer(int32)

Event Instance Priority

Priority of the event instance.

MetaData

string

Event Instance Metadata

Metadata for the event instance.

Description

string

Event Instance Description

Description of the event instance.

Name

string

Event Instance Name

Name of the event instance.

ID

integer(int32)

Event Instance ID

ID of the event instance.


 

EventInstanceWrapper

Summary:

Description:

 

          Properties:

Name

Type

Summary

EventInstance

EventInstance

 

 

Description

string

Event Instance Description

Description of the event instance.

ExpectedDuration

integer(int32)

Event Instance Expected Duration

Expected duration of the event instance.

ID

integer(int32)

Event Instance ID

ID of the event instance.

MetaData

string

Event Instance Metadata

Metadata for the event instance.

Name

string

Event Instance Name

Name of the event instance.

Priority

integer(int32)

Event Instance Priority

Priority of the event instance.

StartDate

string(date-time)

Event Instance Start Date

Date and time the event instance started.


 

ServerEventDataResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

serialNumber

string

Server Event Serial Number

The serial number of the server event. Ex: 1234_5678

workflowID

integer(int32)

Server Event Workflow ID

The ID of the workflow associated with the server event.

workflowName

string

Server Event Workflow Name

The name of the workflow associated with the server event.

workflowDisplayName

string

Server Event Workflow Display Name

The display name of the workflow associated with the server event.

workflowCategory

string

Server Event Workflow Category

The category of the workflow associated with the server event.

workflowInstanceID

integer(int32)

Server Event Workflow Instance ID

The instance ID of the workflow associated with the server event.

workflowInstanceFolio

string

Server Event Workflow Folio

The folio of the workflow instance associated with the server event.

activityInstanceID

integer(int32)

Server Event Activity Instance ID

The activity instance ID of the server event.

activityInstanceDestinationID

integer(int32)

Server Event Activity Destination ID

The activity instance destination ID of the server event.

activityName

string

Server Event Activity Name

The activity name of the server event.

eventName

string

Server Event Event Name

The event name of the server event.

eventDescription

string

Server Event Event Description

The event description of the server event.

originator

User

 

 

eventInstance

EventInstanceWrapper

 

 

dataFields

DataFields

Server Event Activity Data Fields

The data fields of the activity.

xmlFields

array of (UserDefinedXmlField)

Server Event Activity XML Fields

The XML fields of the activity.

itemReferences

ItemReferences

Server Event Item References

The item references of the workflow instance.

workflowInstanceDataFieldsString

string

Server Event Workflow Data Fields String

String representaation of the data fields of the Workflow Instance.

itemReferencesString

string

Server Event Item References String

String representing the item references of the workflow instance.

viewFlowURL

string

 

 

 

DataFields

Summary: Server Event Activity Data Fields

Description: The data fields of the activity.

 

          Properties:

Name

Type

Summary

 

ItemReferences

Summary: Server Event Item References

Description: The item references of the workflow instance.

 

          Properties:

Name

Type

Summary

 


 

Task

Summary:

Description:

 

          Properties:

Name

Type

Summary

serialNumber

string

Task Serial Number

The serial number of the task. Ex: 1234_5678

status

string

Task Status

The status of the task. Ex: Open, Completed, Sleep, Allocated, Available  Values: [Open, Completed, Sleep, Allocated, Available]

taskStartDate

string(date-time)

Task Start Date

The start date of the task.

sleepUntil

string(date-time)

Task Sleep Duration

The date and time when the task will wake.

priority

integer(int32)

Task Priority

The priority of the task.

formURL

string

Task Form URL

The form URL of the task.

viewFlowURL

string

Task View Flow URL

The View Flow URL of the task.

workflowID

integer(int32)

Task Workflow ID

The ID of the workflow associated with the task.

workflowName

string

Task Workflow Name

The name of the workflow associated with the task.

workflowDisplayName

string

Task Workflow Display Name

The display name of the workflow associated with the task.

workflowCategory

string

Task Workflow Category

The category of the workflow associated with the task.

workflowInstanceID

integer(int32)

Task Workflow Instance ID

The instance ID of the workflow associated with the task.

workflowInstanceFolio

string

Task Workflow Folio

The folio of the workflow instance associated with the task.

activityInstanceID

integer(int32)

Task Instance ID

The activity instance ID of the task.

activityInstanceDestinationID

integer(int32)

Task Destination ID

The activity instance destination ID of the task.

activityName

string

Task Activity Name

The activity name of the task.

eventName

string

Task Event Name

The event name of the task.

eventDescription

string

Task Event Description

The event description of the task.

originator

User

 

 

actions

TaskActionsResponse

 

 

workflowInstanceDataFields

WorkflowInstanceDataFields

Task Workflow Data Fields

The data fields of the workflow instance.

activityDataFields

ActivityDataFields

Task Activity Data Fields

The data fields of the activity.

workflowInstanceXmlFields

array of (UserDefinedXmlField)

Task Workflow XML Fields

The XML fields of the workflow instance.

itemReferences

ItemReferences

Task Item References

The item references of the workflow instance.

instruction

string

 

 

workflowInstanceDataFieldsString

string

Task Workflow Data Fields String

String representaation of the data fields of the Workflow Instance.

itemReferencesString

string

Task Item References String

String representing the item references of the workflow instance.

 

WorkflowInstanceDataFields

Summary: Task Workflow Data Fields

Description: The data fields of the workflow instance.

 

          Properties:

Name

Type

Summary

 

ActivityDataFields

Summary: Task Activity Data Fields

Description: The data fields of the activity.

 

          Properties:

Name

Type

Summary

 

ItemReferences

Summary: Task Item References

Description: The item references of the workflow instance.

 

          Properties:

Name

Type

Summary

 


 

TaskActionsResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

nonBatchableActions

array of (string)

Nonbatchable Actions

List of actions that cannot be taken without assigning the task.

batchableActions

array of (string)

Batchable Actions

List of actions that can be taken without assigning the task.

systemActions

array of (string)

System Actions

List of system actions.


 

TaskLite

Summary:

Description:

 

          Properties:

Name

Type

Summary

serialNumber

string

Task Serial Number

The serial number of the task. Ex: 1234_5678

status

string

Task Status

The status of the task. Ex: Open, Completed, Sleep, Allocated, Available  Values: [Open, Completed, Sleep, Allocated, Available]

taskStartDate

string(date-time)

Task Start Date

The start date of the task.

sleepUntil

string(date-time)

Task Sleep Duration

The date and time when the task will wake.

priority

integer(int32)

Task Priority

The priority of the task.

formURL

string

Task Form URL

The form URL of the task.

viewFlowURL

string

Task View Flow URL

The View Flow URL of the task.

workflowID

integer(int32)

Task Workflow ID

The ID of the workflow associated with the task.

workflowName

string

Task Workflow Name

The name of the workflow associated with the task.

workflowDisplayName

string

Task Workflow Display Name

The display name of the workflow associated with the task.

workflowCategory

string

Task Workflow Category

The category of the workflow associated with the task.

workflowInstanceID

integer(int32)

Task Workflow Instance ID

The instance ID of the workflow associated with the task.

workflowInstanceFolio

string

Task Workflow Folio

The folio of the workflow instance associated with the task.

activityInstanceID

integer(int32)

Task Instance ID

The activity instance ID of the task.

activityInstanceDestinationID

integer(int32)

Task Activity Destination ID

The activity instance destination ID of the task.

activityName

string

Task Activity Name

The activity name of the task.

eventName

string

Task Event Name

The event name of the task.

eventDescription

string

Task Event Description

The event description of the task.

originator

User

 

 

actions

TaskActionsResponse

 

 

instruction

string

Task Instructions

The instructions associated with the task.


 

TasksResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

itemCount

integer(int32)

Task Count

The count of tasks returned.

tasks

array of (TaskLite)

Tasks

One or more tasks.


 

Tasks_PostAssignActionResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

Tasks_PostWakeActionResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary


 

UpdateFieldsRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

XmlFields

array of (UserDefinedXmlField)

XML Fields

The XML fields of the workflow instance.

ItemReferences

ItemReferences

Item References

The Item Reference fields of the workflow instance.

DataFields

DataFields

Data Fields

The data fields of the workflow instance.

 

ItemReferences

Summary: Item References

Description: The Item Reference fields of the workflow instance.

 

          Properties:

Name

Type

Summary

 

DataFields

Summary: Data Fields

Description: The data fields of the workflow instance.

 

          Properties:

Name

Type

Summary

 


 

User

Summary:

Description:

 

          Properties:

Name

Type

Summary

username

string

User Name

User name of the person.

fqn

string

User FQN

Fully qualified name of the person. Ex: bob@denallix.com, K2:Denallix\Bob

email

string

User Email

Email address of the person.

manager

string

User Manager

Manager of the person.

displayName

string

User Display Name

Display name of the person.


 

UserDefinedRedirect

Summary:

Description:

 

          Properties:

Name

Type

Summary

RedirectTo

string

Redirect Information

The person to whom the task is redirected.


 

UserDefinedSleep

Summary:

Description:

 

          Properties:

Name

Type

Summary

SleepFor

integer(int32)

Sleep For

The number of seconds to sleep a task.

SleepUntil

string(date-time)

Sleep Until

The date and time to wake the task. Format: yyyy-MM-ddTHH:mm:ss:fffZ UTC


 

UserDefinedWorkflowInstance

Summary:

Description:

 

          Properties:

Name

Type

Summary

folio

string

Workflow Folio

The folio of the workflow instance.

expectedDuration

integer(int32)

Workflow Expected Duration

The expected duration of the workflow instance.

priority

integer(int32)

Workflow Priority

The priority of the workflow instance.

dataFields

DataFields

Workflow Data Fields

The data fields of the workflow instance.

xmlFields

array of (UserDefinedXmlField)

Workflow XML Fields

The XML fields of the workflow instance.

itemReferences

ItemReferences

Workflow Item References

The item references of the workflow instance.

workflow

Workflow

Workflow Schema

The schema of the workflow instance.

 

DataFields

Summary: Workflow Data Fields

Description: The data fields of the workflow instance.

 

          Properties:

Name

Type

Summary

 

ItemReferences

Summary: Workflow Item References

Description: The item references of the workflow instance.

 

          Properties:

Name

Type

Summary

 

Workflow

Summary: Workflow Schema

Description: The schema of the workflow instance.

 

          Properties:

Name

Type

Summary

 


 

UserDefinedXmlField

Summary:

Description:

 

          Properties:

Name

Type

Summary

name

string

XML Field Name

The name of an XML field.

value

string

XML Field Value

The value of the XML field.


 

WorkflowDataResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

workflowInfo

WorkflowDefinition

 

 

workflowSchema

string

Workflow Schema

The schema of the workflow.


 

WorkflowDefinition

Summary:

Description:

 

          Properties:

Name

Type

Summary

name

string

Workflow Name

The name of the workflow.

description

string

Workflow Description

The description of the workflow.

folder

string

Workflow Folder

The folder (category) of the workflow.

systemName

string

Workflow System Name

The system name of the workflow.

expectedDuration

integer(int32)

Workflow Expected Duration

The expected duration of the workflow.


 

WorkflowLabel

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

integer(int32)

Workflow ID

The ID of the workflow.

defaultVersionId

integer(int32)

Workflow Default Version

The default workflow version.

name

string

Workflow Name

The workflow name.

folder

string

Workflow Folder

The workflow folder.

systemName

string

Workflow System Name

The workflow system name.


 

WorkflowLabelsResponse[WorkflowLabel]

Summary:

Description:

 

          Properties:

Name

Type

Summary

itemCount

integer(int32)

Item Count

The number of workflows.

workflows

array of (WorkflowLabel)

Workflows

A list of workflows.