Adds a task definition to the specified workflow step.

Syntax

Visual Basic (declaration)
Public Function AddFlowTaskDef( _ 
ByVal AuthenticationTicket as String, _ ByVal DomainName as String, _ ByVal FlowName as String, _ ByVal StepNumber as Integer, _ ByVal TaskDefXML as String) as XmlNode

C# (declaration)
public XmlNode AddFlowTaskDef( 
string AuthenticationTicket, string DomainName, string FlowName, integer StepNumber, string TaskDefXML)

Parameters

AuthenticationTicket
    string infoRouter ticket
DomainName
    string The domain/library name
FlowName
    string The name of the workflow
StepNumber
    integer The step number
TaskDefXML
    string Task definition xml in string format. Find details in remarks section

Return Value

returns xml fragment.
<response success="true" error="">
if success = "true", task has been added successfully.
if success = "false", the error attribute returns the error description.

Remarks


TaskDefXML parameter sample XML syntax :
<xml>
<TaskDef TaskName="Read the latest version of the document" DeadLine="24" RequiredAssigneeCount="0" SuperVisorId="0" SupervisorNotificationOnDue="0" Priority="5" AllowedStartTimeSpan="0" ReminderTimeSpan="0">
<Requirements>
<Requirement Name="Edit" Value="False"/>
<Requirement Name="LatestVersionRead" Value="True"/>
<Requirement Name="PublishedVersionRead" Value="False"/>
<Requirement Name="Comments" Value="False"/>
<Requirement Name="Approval" Value="False"/>
<Requirement Name="ISOReview" Value="False"/>
<Requirement Name="SOXReview" Value="False"/>
<Requirement Name="Dispose" Value="False"/>
<Requirement Name="Archive" Value="False"/>
<Requirement Name="Downgrade" Value="False"/>
<Requirement Name="Declassify" Value="False"/>
</Requirements>
<Permissions>
<Permission Name="EditDocument" Value="True"/>
<Permission Name="ChangeFinishdate" Value="False"/>
<Permission Name="Postpone" Value="False"/>
<Permission Name="ChangePriority" Value="False"/>
<Permission Name="EditNextStep" Value="False"/>
<Permission Name="EditAllSteps" Value="False"/>
</Permissions>
<instruction>Please review the document and edit if nesessary</instruction>
<AssigneeList>
<Users>
<User UserID="1053" />
</Users>
<UserGroups/>
<SpecialUserRoles/>
</AssigneeList>
</TaskDef>

</xml>

TaskName : string; The name of the task

DeadLine : integer;
When the step is activated, the deadline value is calculated as the due date (specified in hours) (example 24 means 1 day)

RequiredAssigneeCount : integer;
0 all assignees must complete the task,
1 one user is enough to finish the task.

SupervisorId : User Id of the supervisor.
0 means no supervisor

SupervisorNotificationOnDue : Number of hours before the supervisor will be notified (task is late)

Priority : The priority of the task.
Possible values:
No priority : 0
Low : 1
Normal : 5
High : 10
Urgent :11

AllowedStartTimeSpan : Number of hours that the user can start the task before its due date.

0 means no restrictions. Assignee may start performing the task any time after the task has been assigned.

ReminderTimeSpan : When the reminder email will be sent.
Number of hours before due date. (only sent if the task is not completed)



Requirements Section:

Edit : Boolean True / False; If true the assignee must edit the document, before the task completion

LatestVersionRead : Boolean True / False; If true the assignee must read the latest version of the document.

PublishedVersionRead : Boolean True / False; If true the assignee must read the published version of the document. If there is no published version, reading the latest version will be enough to complete the task.

Comments: Boolean True / False; If true the assignee must write a comment.

Approval: Boolean True / False; If true the assignee must choose a approve / reject decision as instructed.

ISOReview : Boolean True / False; If true the assignee must write an ISO comment.

SOXReview : Boolean True / False; If true the assignee must write an SOX comment.

Archive : Boolean True / False; If true the assignee must move the document to an archive library

Downgrade : Boolean True / False; If true the assignee must downgrade the document.

Declassify : Boolean True / False; If true the assignee must declassify the document.



Permissions Section

EditDocument : Boolean True / False; If true the assignee can edit the document. Normally documents cannot be edited in a workflow. Assignee needs to have security rights to change the documents

ChangeFinishdate: Boolean True / False; If true the assignee can specify a finish date while completing the task.

Postpone: Boolean True / False; If true the assignee can postpone the due date.

ChangePriority: Boolean True / False; If true the assignee can change the priority of the task.

EditNextStep: Boolean True / False; If true the assignee can edit the task definition in the next step while the workflow is running.

EditAllSteps: Boolean True / False; If true the assignee can edit the task definitions in the all further steps while the workflow is running.


instruction : The instructions to the assignee.


AssigneeList (Assignee list must have at list one assignee in the "users", "usergroups" or "special roles" section except first step. If no assignee has been specified in the first step, The submitter will be instructed to choose assignees at submission. Please note that only the first step can include a single task that has been designed to have no users.


AssigneeList / Users / User

UserID : integer;
The user id of the assignee (optional).


AssigneeList / UserGroups / UserGroup

GroupID : integer; (optional).
The user group id. The user group members are extracted at the time of task activation.

AssigneeList / SpecialUserRoles / SpecialUserRole

The role id (optional)
RoleId : integer;

Possible values:
-5 for document owner,
-8 for submitter

The users in the specific role are extracted at the time of submission.