WAPI ( Workflow Application Programming Interface) maintains a database of Maps, and Work along with providing functions to query the Work database in order to retrieve specified lists.
Maps define the Tasks and Links between the tasks. When a Map is Initiated Work is created. Map definitions may either be saved in the database or Initiated directly from the definition.
The Work database represents the current status of all Work in progress. The Work database refers to the Map database for all execution information.
The followings are types of WAPI object handles used with the WAPI functions:
- WAPIMAP
- WAPIMAPTASK
- WAPIWORK
- WAPISUBWORK
Integer AUDIT_SUBWORKDONE
An audit trail constant specifying that a sub-workflow finished.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_SUBWORKSTARTEDInteger AUDIT_SUBWORKSTARTED
An audit trail constant specifying that a sub-workflow started.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_SUBWORKUPDATEDInteger AUDIT_SUBWORKUPDATED
An audit trail constant specifying that a sub-workflow map definition was modified.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKACCEPTEDInteger AUDIT_TASKACCEPTED
An audit trail constant specifying that a task assigned to a group was accepted by a member of the group.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKBKGNSENDONInteger AUDIT_TASKBKGNSENDON
An audit trail constant specifying that the task's send on processing has been done in the background using the Workflow Agent.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKBKGNSTARTEDInteger AUDIT_TASKBKGNSTARTED
An audit trail constant specifying that work on a task (in the base system this includes any auto done step or Item Handler step) has been started in the background using the Workflow Agent.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKCANCELLEDInteger AUDIT_TASKCANCELLED
An audit trail constant specifying that a task as been cancelled.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKDONEInteger AUDIT_TASKDONE
An audit trail constant specifying that work on a task had been completed and the task marked as done.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKEXECUTINGInteger AUDIT_TASKEXECUTING
An audit trail constant specifying that the task was executing.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKFINISHEDInteger AUDIT_TASKFINISHED
An audit trail constant specifying that work on a task had been finished for the current work period, but the task was not marked as done.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKKILLEDInteger AUDIT_TASKKILLED
An audit trail constant specifying that a task was marked as killed.
This indicates that the path containing the task was not taken as the result of an evaluation. The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKREADYInteger AUDIT_TASKREADY
An audit trail constant specifying that a task became ready.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKREASSIGNEDInteger AUDIT_TASKREASSIGNED
An audit trail constant specifying that a task was reassigned to a different user.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKRESUMEDInteger AUDIT_TASKRESUMED
An audit trail constant specifying that a suspended task was resumed.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKRESURRECTEDInteger AUDIT_TASKRESURRECTED
An audit trail constant specifying that a task was resurrected.
This indicates that a loopback occurred and the path containing the task is once again available. The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKSTARTEDInteger AUDIT_TASKSTARTED
An audit trail constant specifying that work on a task was started.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_TASKSUSPENDEDInteger AUDIT_TASKSUSPENDED
An audit trail constant specifying that a task was suspended.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_USERDATAInteger AUDIT_USERDATA
An audit trail constant specifying that a custom event was added to the audit trail.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_WORKARCHIVEDInteger AUDIT_WORKARCHIVED
An audit trail constant specifying that the workflow was archived.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_WORKDONEInteger AUDIT_WORKDONE
An audit trail constant specifying that the workflow was completed.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_WORKRESUMEDInteger AUDIT_WORKRESUMED
An audit trail constant specifying that the suspended workflow was resumed.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_WORKSTARTEDInteger AUDIT_WORKSTARTED
An audit trail constant specifying that the workflow was started.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_WORKSTOPPEDInteger AUDIT_WORKSTOPPED
An audit trail constant specifying that the workflow was stopped.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
AUDIT_WORKSUSPENDEDInteger AUDIT_WORKSUSPENDED
An audit trail constant specifying that the workflow was suspended.
The constant is returned in the WorkAudit_Status column of the RecArray returned by a call to WAPI.LoadWorkAudit().
FALSEInteger FALSE
A constant specifying that the False links should be taken.
This constant is used by the WAPI.TaskDone() function as the flag indicating which link types should be taken coming from the task.
Integer LIST_IFINITIATED
A constant specifying that only entries where the current user was the initiator should be returned.
This constant is used as a bit-mask flag for the call WAPI.WorkList().
LIST_IFMANAGEDInteger LIST_IFMANAGED
A constant specifying that only entries where the current user is the manager should be returned.
This constant is used as a bit-mask flag for the call WAPI.WorkList().
LIST_IFPERFORMERInteger LIST_IFPERFORMER
A constant specifying that only entries where the current user is the task performer should be returned.
This constant is used as a bit-mask flag for the call WAPI.WorkList(). This flag is used to determine the ToDo list for a user.
LOOPInteger LOOP
A constant specifying that the Loop links should be taken.
This constant is used by the WAPI.TaskDone() function as the flag indicating which link types should be taken coming from the task.
MAP_FLAG_ARCHIVEONCOMPLETEInteger MAP_FLAG_ARCHIVEONCOMPLETE
A constant specifying that the workflow should automatically be Archived upon completion.
This constant can be combined with the other Map_Flag constants by Bitwise OR and used to set the Flag field for a Map to control workflow actions.
MAP_FLAG_DELETEONCOMPLETEInteger MAP_FLAG_DELETEONCOMPLETE
A constant specifying that the workflow should automatically be Deleted upon completion.
This constant can be combined with other Map_Flag constants by Bitwise OR and used to set the Flag field for a Map to control workflow actions.
MAP_FLAG_EMAILATTACHMENTASFILEInteger MAP_FLAG_EMAILATTACHMENTASFILE
A constant specifying that the e-mail sent by the workflow will contain their attachments as files included with the e-mail.
This constant can be combined with other Map_Flag constants by Bitwise OR and used to set the Flag field for a Map to control workflow actions.
MAP_FLAG_EMAILATTACHMENTASLINKInteger MAP_FLAG_EMAILATTACHMENTASLINK
A constant specifying that the e-mail sent by the workflow will contain their attachments as HTML links back into Livelink.
This constant can be combined with other Map_Flag constants by Bitwise OR and used to set the Flag field for a Map to control workflow actions.
MAP_FLAG_RESUMEONRETURNInteger MAP_FLAG_RESUMEONRETURN
A constant specifying that when this Map is used for a sub-workflow and the sub-workflow completes, the task that started the sub-workflow should be marked as done and the workflow route continued.
This constant can be combined with other Map_Flag constants by Bitwise OR and used to set the Flag field for a Map to control workflow actions.
MAP_FLAG_SKIPWEEKENDSInteger MAP_FLAG_SKIPWEEKENDS
A constant specifying that the workflow should skip weekends when calculating due date.
This constant can be combined with other Map_Flag constants by Bitwise OR and used to set the Flag field for a Map to control workflow actions.
MAP_FLAG_TEMPMAPInteger MAP_FLAG_TEMPMAP
A constant specifying that the Map should automatically be Deleted when the workflow is deleted.
This constant can be combined with other Map_Flag constants by Bitwise OR and used to set the Flag field for a Map to control workflow actions.
MAPTASK_FALSELINKSInteger MAPTASK_FALSELINKS
A constant specifying that the False branches from a task should be taken. This constant should be used as the linkType for a call to WAPI.TaskDone().
MAPTASK_FLAG_AUTODONEInteger MAPTASK_FLAG_AUTODONE
A constant specifying that the task should
automatically become Done as soon as it becomes ready.
Integer MAPTASK_FLAG_BKGNSENDON
A constant specifying that the task's send on processing
should occur in the background (by the Workflow Agent as a separate process). This is used to gain
efficiencies and performance improvements especially if the steps proceeding this step are autodone
steps ( for example, Evaluate, Process, Subworkflow, Milestone, etc.).
Integer MAPTASK_FLAG_EMAILENABLED
A constant specifying that the task has been e-mail enabled.
When this task becomes ready, an e-mail will be sent to the Assignee(s) allowing the task to be completed through e-mail.
Integer MAPTASK_FLAG_MILESTONE
A constant specifying that the task should be marked as a Milestone task and Milestone dates should be calculated and stored.
MAPTASK_FLAG_RECALCULATEInteger MAPTASK_FLAG_RECALCULATE
A constant specifying that the task should invoke the recalculate due date processing when the task has been sent on.
MAPTASK_LOOPLINKSInteger MAPTASK_LOOPLINKS
A constant specifying that the Loopback
branch from a task should be taken. This constant should be used as the linkType
for a call to WAPI.TaskDone().
Integer MAPTASK_TRUELINKS
A constant specifying that the True branches from a task should be taken. This constant should be used as the linkType for a call to WAPI.TaskDone().
STARTTASK_FLAG_NOAUDITInteger STARTTASK_FLAG_NOAUDIT
A constant specifying that the WAPI.StartTask() call should not add an event to the audit trail.
STARTTASK_FLAG_REEXECUTEInteger STARTTASK_FLAG_REEXECUTE
A constant specifying that the WAPI.StartTask() call should mark the task as started even if it was already marked as started.
SUBWORKTASK_CUSTOMDATAInteger SUBWORKTASK_CUSTOMDATA
A constant specifying the CustomData for a workflow task in an update call.
Use this constant with the call WAPI.UpdateTaskAttribute().
SUBWORKTASK_FLAGSInteger SUBWORKTASK_FLAGS
A constant specifying the Flags for a workflow task in an update call.
Use this constant with the call WAPI.UpdateTaskAttribute().
SUBWORKTASK_FLAG_AUTODONEInteger SUBWORKTASK_FLAG_AUTODONE
A constant specifying that the task should automatically complete when it becomes ready.
Use this constant with the call WAPI.UpdateTaskAttribute() when setting the task Flags with the WAPI.SUBWORKTASK_FLAGS constant.
SUBWORKTASK_FLAG_BACKGROUNDInteger SUBWORKTASK_FLAG_BACKGROUND
A constant specifying that the task should be performed in the background (by the Workflow Agent). The Item Handler step is the only step that supports this capability.
Use this constant with the call WAPI.UpdateTaskAttribute() when setting the task Flags with the WAPI.SUBWORKTASK_FLAGS constant.
SUBWORKTASK_FLAG_BKGNSENDONInteger SUBWORKTASK_FLAG_BKGNSENDON
A constant specifying that the task's send on processing should occur in the background (by the Workflow Agent as a separate process). This is used to gain efficiencies and performance improvements especially if the steps proceeding this step are autodone steps ( for example, Evaluate, Process, Subworkflow, Milestone, etc.).
Use this constant with the call WAPI.UpdateTaskAttribute() when setting the task Flags with the WAPI.SUBWORKTASK_FLAGS constant.
SUBWORKTASK_FLAG_MILESTONEInteger SUBWORKTASK_FLAG_MILESTONE
A constant specifying that the task should be a Milestone task and store a Milestone due date.
Use this constant with the call WAPI.UpdateTaskAttribute() when setting the task Flags with the WAPI.SUBWORKTASK_FLAGS constant.
SUBWORKTASK_FLAG_RECALCULATEInteger SUBWORKTASK_FLAG_RECALCULATE
A constant specifying that the task should invoke the recalculate due date processing when the task has been sent on.
Use this constant with the call WAPI.UpdateTaskAttribute() when setting the task Flags with the WAPI.SUBWORKTASK_FLAGS constant.
SUBWORKTASK_PERFORMERIDInteger SUBWORKTASK_PERFORMERID
A constant specifying the PerformerID for a task in a workflow for an update call.
Use this constant with the call WAPI.UpdateTaskAttribute().
SUBWORKTASK_STATUS_DELETEDInteger SUBWORKTASK_STATUS_DELETED
A status constant specifying that the task was deleted.
SUBWORKTASK_STATUS_DONEInteger SUBWORKTASK_STATUS_DONE
A status constant specifying that the task is done.
SUBWORKTASK_STATUS_EXECUTINGInteger SUBWORKTASK_STATUS_EXECUTING
A status constant specifying that the task is executing.
SUBWORKTASK_STATUS_FINISHEDInteger SUBWORKTASK_STATUS_FINISHED
A status constant specifying that the task is finished.
SUBWORKTASK_STATUS_KILLEDInteger SUBWORKTASK_STATUS_KILLED
A status constant specifying that the task was killed.
SUBWORKTASK_STATUS_READYInteger SUBWORKTASK_STATUS_READY
A status constant specifying that the task is ready.
SUBWORKTASK_STATUS_READY_BGInteger SUBWORKTASK_STATUS_READY_BG
A status constant specifying that the task is ready in the background (currently this is only supported with the Item Handler step).
SUBWORKTASK_STATUS_SENDINGONInteger SUBWORKTASK_STATUS_SENDINGON
A status constant specifying that the task's send on processing is being performed in the background by the Workflow Agent.
SUBWORKTASK_STATUS_STARTEDInteger SUBWORKTASK_STATUS_STARTED
A status constant specifying that the task is started.
SUBWORKTASK_STATUS_SUSPENDEDInteger SUBWORKTASK_STATUS_SUSPENDED
A status constant specifying that the task is suspended.
SUBWORKTASK_STATUS_WAITINGInteger SUBWORKTASK_STATUS_WAITING
A status constant specifying that the task is waiting to become ready.
SUBWORKTASK_TITLEInteger SUBWORKTASK_TITLE
A constant specifying the Title of a task in a workflow for an update call.
Use this constant with the call WAPI.UpdateTaskAttribute().
SUBWORKTASK_TYPE_MILESTONEInteger SUBWORKTASK_TYPE_MILESTONE
A constant specifying that the task is a Milestone task.
SUBWORKTASK_TYPE_NORMALInteger SUBWORKTASK_TYPE_NORMAL
A constant specifying that the task is a Normal task and not a Milestone task.
SUBWORKTASK_USERCOMMENTInteger SUBWORKTASK_USERCOMMENT
A constant specifying the UserComment for a task in a workflow for an update call.
Use this constant with the call WAPI.UpdateTaskAttribute().
SUBWORKTASK_USERDATAInteger SUBWORKTASK_USERDATA
A constant specifying the UserData for a task in a workflow for an update call.
Use this constant with the call WAPI.UpdateTaskAttribute().
SUBWORKTASK_USERSTATUSInteger SUBWORKTASK_USERSTATUS
A constant specifying the UserStatus for a task in a workflow for an update call.
Use this constant with the call WAPI.UpdateTaskAttribute().
SUBWORK_CUSTOMDATAInteger SUBWORK_CUSTOMDATA
A constant specifying the CustomData for a subWork in an update call.
Use this constant with the call WAPI.UpdateSubWorkAttribute().
SUBWORK_FLAGSInteger SUBWORK_FLAGS
A constant specifying the Flags for a subWorkflow in an update call.
Use this constant with the call WAPI.UpdateSubWorkAttribute().
SUBWORK_FLAG_ARCHIVEONCOMPLETEInteger SUBWORK_FLAG_ARCHIVEONCOMPLETE
A constant specifying that the workflow should automatically be Archived upon completion.
This constant can be combined with the other SUBWORK_FLAG constants by Bitwise OR and used with the call WAPI.UpdateSubWorkAttribute() when using the SUBWORK_FLAGS constant to control workflow actions.
SUBWORK_FLAG_DELETEONCOMPLETEInteger SUBWORK_FLAG_DELETEONCOMPLETE
A constant specifying that the workflow should automatically be Deleted upon completion.
This constant can be combined with the other SUBWORK_FLAG constants by Bitwise OR and used with the call WAPI.UpdateSubWorkAttribute() when using the SUBWORK_FLAGS constant to control workflow actions.
SUBWORK_FLAG_RESUMEONRETURNInteger SUBWORK_FLAG_RESUMEONRETURN
A constant specifying that when this workflow is used for a sub-workflow and the sub-workflow completes, the task that started the sub-workflow should be marked as done and the workflow route continued.
This constant can be combined with the other SUBWORK_FLAG constants by Bitwise OR and used with the call WAPI.UpdateSubWorkAttribute() when using the SUBWORK_FLAGS constant to control workflow actions.
SUBWORK_FLAG_SKIPWEEKENDSInteger SUBWORK_FLAG_SKIPWEEKENDS
A constant specifying that the workflow should skip weekends when calculating due dates.
This constant can be combined with the other SUBWORK_FLAG constants by Bitwise OR and used with the call WAPI.UpdateSubWorkAttribute() when using the SUBWORK_FLAGS constant to control workflow actions.
SUBWORK_FLAG_TEMPMAPInteger SUBWORK_FLAG_TEMPMAP
A constant specifying that the Map definition that is used by this workflow should be deleted when the workflow is deleted.
This constant can be combined with the other SUBWORK_FLAG constants by Bitwise OR and used with the call WAPI.UpdateSubWorkAttribute() when using the SUBWORK_FLAGS constant to control workflow actions.
SUBWORK_PROJECTInteger SUBWORK_PROJECT
A constant specifying the Project for a subWorkflow in an update call.
Use this constant with the call WAPI.UpdateSubWorkAttribute().
SUBWORK_STATUS_DONEInteger SUBWORK_STATUS_DONE
A status constant specifying that the subwork has completed.
SUBWORK_STATUS_EXECUTINGInteger SUBWORK_STATUS_EXECUTING
A status constant specifying that the subwork has not yet completed.
SUBWORK_TITLEInteger SUBWORK_TITLE
A constant specifying the Title of a subWorkflow in an update call.
Use this constant with the call WAPI.UpdateSubWorkAttribute().
SUBWORK_USERDATAInteger SUBWORK_USERDATA
A constant specifying the UserData for a subWorkflow in an update call.
Use this constant with the call WAPI.UpdateSubWorkAttribute().
TRUEInteger TRUE
A constant specifying that the True links should be taken.
This constant is used by the WAPI.TaskDone() function as the flag indicating which link types should be taken coming from the task.
WORK_CUSTOMDATAInteger WORK_CUSTOMDATA
A constant specifying the CustomData for a workflow in an update call.
Use this constant with the call WAPI.UpdateWorkAttribute().
WORK_FLAGSInteger WORK_FLAGS
A constant specifying the Flags for a workflow in an update call.
Use this constant with the call WAPI.UpdateWorkAttribute().
WORK_MANAGERIDInteger WORK_MANAGERID
A constant specifying the ManagerID for a workflow in an update call.
Use this constant with the call WAPI.UpdateWorkAttribute().
WORK_OWNERIDInteger WORK_OWNERID
A constant specifying the OwnerID for a workflow in an update call.
Use this constant with the call WAPI.UpdateWorkAttribute().
WORK_PROJECTInteger WORK_PROJECT
A constant specifying the Project for a workflow in an update call.
Use this constant with the call WAPI.UpdateWorkAttribute().
WORK_STATUS_ARCHIVEDInteger WORK_STATUS_ARCHIVED
A status constant specifying that the workflow has been Archived.
WORK_STATUS_DONEInteger WORK_STATUS_DONE
A status constant specifying that the workflow has been Completed.
WORK_STATUS_EXECUTINGInteger WORK_STATUS_EXECUTING
A status constant specifying that the workflow is still executing.
WORK_STATUS_STOPPEDInteger WORK_STATUS_STOPPED
A status constant specifying that the workflow has been Stopped.
WORK_STATUS_SUSPENDEDInteger WORK_STATUS_SUSPENDED
A status constant specifying that the workflow has been Suspended.
WORK_TITLEInteger WORK_TITLE
A constant specifying the Title for a workflow in an update call.
Use this constant with the call WAPI.UpdateWorkAttribute().
WORK_USERDATAInteger WORK_USERDATA
A constant specifying the UserData for a workflow in an update call.
Use this constant with the call WAPI.UpdateWorkAttribute().
AcceptTaskInteger AcceptTask( WAPIWORK work, Integer workID, Integer subworkID, Integer taskID )
Assigns a step that was previously assigned to a group to the currently logged in user.
This call changes the SubWorkTask_PerformerID column in the WSubWorkTask table to the ID of the currently logged in user.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
subworkID | - | The subworkID for the desired sub-workflow. |
taskID | - | The taskID for the desired step. |
Integer AccessWork( WAPIWORK work, Integer workID, [Integer subworkID] )
Sets up a WAPIWORK object handle to provide access to the data package of a workflow.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
subworkID | - | The optional subworkID for the desired sub-workflow. |
Integer AddTaskLink( WAPIMAPTASK fromtask, Integer linktype, WAPIMAPTASK totask )
Adds a link, of the specified type, between the specified tasks.
fromtask | - | The WAPIMAPTASK handle specifying the task the link should come from. |
linktype | - |
Specifies a constant indicating the link type, can be: |
totask | - | The WAPIMAPTASK handle specifying the task the link should go to. |
Integer AddWorkData( WAPIWORK work, Integer type, Integer subtype, [String descripton], Dynamic value )
Creates and sets data stored in a data package.
work | - | The WAPIWORK object handle. |
type | - | The data package type. |
subtype | - | The data package subtype. |
description | - | Optional description of the data. |
value | - | The data value to store. |
WAPIMAP AllocMap( WAPISESSION session )
Allocates a WAPIMAP object handle. This map handle is used to define workflow maps.
session | - | The WAPISESSION object handle. |
WAPIMAPTASK AllocMapTask( WAPIMAP map )
Allocates a WAPIMAPTASK object handle. This mapTask handle is used to define a task for a workflow map.
map | - | The WAPIMAP object handle for the desired workflow map. |
WAPIMAPTASK AllocNthMapTask( WAPIMAP map, Integer taskID )
Allocates a WAPIMAPTASK object handle for a particular task in a workflow map definition. This mapTask handle is used to define a task for a workflow map.
map | - | The WAPIMAP object handle for the desired workflow map. |
taskID | - | The id for the desired workflow task. |
WAPISESSION AllocSession( CAPILOGIN login )
Allocates a WAPISESSION object for a login user.
A WAPISESSION contains information pertaining to workflow management.
login | - | The CAPILOGIN object handle specifically for the login user. |
WAPISUBWORK AllocSubWork( WAPIWORK work )
Allocates a WAPISUBWORK object for the specified WAPIWORK object.
work | - | The WAPIWORK object handle. |
WAPIWORK AllocWork( WAPISESSION session )
Allocates a WAPIWORK object.
session | - | The WAPISESSION object handle. |
Integer ArchiveWork( WAPIWORK work, Integer workID )
Sets the status of a Stopped or Completed workflow to Archived.
This changes the Work_Status field of the workflow to WAPI.WORK_STATUS_ARCHIVED.
Use a WAPIWORK object returned from a previous call to WAPI.AllocWork().
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
Integer CallSubWork( WAPIWORK work )
Initiates a Sub-Workflow using the information supplied in a previous call to WAPI.PrepareSubMap() or WAPI.PrepareSubWork().
work | - | The WAPIWORK object handle. |
RecArray ColumnStringToValue( WAPISESSION session, RecArray array, String colName )
Converts the values returned by a call to WAPI.WorkList() from Strings to their true values.
Some pieces of data are stored as Strings or BLOBs in the WAPI database. To improve performance these values are returned as Strings and not their original type. If the original type of the data is required this call is used to convert the data from a String back to the original type.
session | - | The WAPISESSION object handle. |
array | - | The returned RecArray. |
colName | - | The name of the column whose values should be converted. |
Integer DeleteMapByID( WAPISESSION session, Integer mapID )
Deletes the Map from the Map database with the specified mapID.
session | - | The WAPISESSION object handle. |
mapID | - | The ID of the desired Map. |
Integer DeleteMapTask( WAPIMAPTASK task )
Deletes the task from the map definition. This task was determined using WAPI.AllocMapTask() or WAPI.AllocNthMapTask().
task | - | The WAPIMAPTASK object handle. |
Integer DeleteTaskLink( WAPIMAPTASK fromTask, Integer linkType, WAPIMAPTASK toTask )
Deletes the link from the specified tasks.
fromTask | - | The WAPIMAPTASK handle specifying the task the link comes from. |
linkType | - | Specifies a constant indicating the
link type, can be: WAPI.MAPTASK_FALSELINKS WAPI.MAPTASK_LOOPLINKS WAPI.MAPTASK_TRUELINKS |
toTask | - | The WAPIMAPTASK handle specifying the task the link goes to. |
Integer DeleteWork( WAPIWORK work, Integer workID )
Deletes the specified Stopped or Completed workflow.
Use a WAPIWORK object returned from a previous call to WAPI.AllocWork().
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
Integer DeleteWorkData( WAPIWORK work, Integer type, Integer subtype )
Deletes data from the Data Package specified by the type and subtype.
Use a WAPIWORK object returned from a previous call to WAPI.AccessWork().
work | - | The WAPIWORK object handle. |
type | - | The type of data in the Data Package. |
subtype | - | The subtype of data in the Data Package. |
Integer FreeMap( WAPIMAP map )
Frees the memory held by the WAPIMAP object.
map | - | The WAPIMAP object handle. |
Integer FreeMapTask( WAPIMAPTASK task )
Frees the memory held by the WAPIMAPTASK object.
task | - | The WAPIMAPTASK handle. |
Integer FreeSession( WAPISESSION session )
Logs out the WAPISESSION object and frees any associated memory.
session | - | The WAPISESSION object handle. |
Integer FreeSubWork( WAPISUBWORK subWork )
Frees the memory held by the WAPISUBWORK object.
subWork | - | The WAPISUBWORK object handle. |
Integer FreeWork( WAPIWORK work )
Frees the memory held by the WAPIWORK object.
work | - | The WAPIWORK object handle. |
List GetTaskLinks( WAPIMAPTASK task, Integer linkType )
Gets a List of the task ids for all links of the specified types for the specified task.
task | - | The WAPIMAPTASK handle. |
linkType | - | Specifies a constant indicating the
link type, can be: WAPI.MAPTASK_FALSELINKS WAPI.MAPTASK_LOOPLINKS WAPI.MAPTASK_TRUELINKS |
Dynamic GetWorkData( WAPIWORK work, Integer type, Integer subtype )
Gets the data from the specified type and subtype stored in the data package.
work | - | The WAPIWORK object handle. |
type | - | The type of data in the Data Package. |
subtype | - | The subtype of data in the Data Package. |
Integer LLMapToWMap( WAPIMAP map, RecArray mapInfo, RecArray tasks, RecArray links )
Takes a map definition from Livelink OScript and converts it to a WAPIMAP definition.
map | - | The WAPIMAP object handle. |
mapInfo | - | A RecArray with only one row which describes various properties of the map. |
tasks | - | A RecArray with one row for each task to add to the map definition. |
links | - | A RecArray with one row for each link to add to the map definition. |
RecArray ListWorkData( WAPIWORK work, [Boolean allWork )
Returns the data that was stored for the specified work.
work | - | The WAPIWORK object handle. |
allWork | - | Optional parameter used to specify whether all the data, including any subworkflow data, should be returned. By default allWork is set to False. |
Integer LoadMapByID( WAPIMAP map, Integer mapID )
Loads the map information from the Map database for the map with the specified ID.
Allocate a WAPIMAP object then use this call to populate the WAPIMAP data.
map | - | The WAPIMAP object handle. |
mapID | - | The ID for the desired map. |
RecArray LoadTaskStatus( WAPISESSION session, Integer workID, [Integer subWorkID], [Integer taskID] )
Loads the task information for the specified workID, subWorkID, and taskID.
If only the workID is specified then the returned RecArray will contain 1 row for every task in every subWork for the work with the given workID. If the workID and subWorkID are specified then the RecArray will contain 1 row for every task in the subWork for the given workID and subWorkID. If the workID, subWorkID, and taskID are specified then only 1 row will be returned for the desired task.
session | - | The WAPISESSION object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The optional subWorkID for the desired sub-workflow. |
taskID | - | The optional taskID for the desired workflow task. |
RecArray LoadWorkAudit( WAPISESSION session, Integer workID, [Integer subWorkID], [Integer taskID] )
Loads the audit trail for the specified workID, subWorkID, and taskID.
If only the workID is specified then the returned RecArray will contain the audit information for every subWork and task for the work with the given workID. If the workID and subWorkID are specified then the RecArray will contain the audit information for the given workID and subWorkID. If the workID, subWorkID, and taskID are specified then only the audit information for the desired task will be returned.
session | - | The WAPISESSION object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The optional subWorkID for the desired sub-workflow. |
taskID | - | The optional taskID for the desired workflow task. |
List LoadWorkStatus( WAPISESSION session, Integer workID, [Integer subWorkID], [Integer taskID] )
Loads the information for a workflow. You can optionally limit the amount of data returned by specifying a subWorkID and a taskID. A List of 3 RecArrays is returned where the first RecArray contains information about the workflow as a whole, the second RecArray contains information about the sub-workflows, and the third RecArray contains information about the workflow tasks.
session | - | The WAPISESSION object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The optional subWorkID for the desired sub-workflow. |
taskID | - | The optional taskID for the desired workflow task. |
Integer PrepareMap( WAPIWORK work, WAPIMAP map, [Integer flags] )
Saves the map definition to the map database and sets up the work object for workflow initiation.
work | - | The WAPIWORK object handle. |
map | - | The WAPIMAP object handle for the desired map. |
flags | - |
Optional flag values to control the map. The available values are: |
Integer PrepareSubMap( WAPIWORK work, WAPIMAP map, [Integer flags] )
Saves the map definition to the map database and sets up the work object to initiate the map as a sub-workflow.
work | - | The WAPIWORK object handle. |
map | - | The WAPIMAP object handle for the desired map. |
flags | - | Optional flag values to control the
map. The available values are: WAPI.MAP_FLAG_ARCHIVEONCOMPLETE WAPI.MAP_FLAG_DELETEONCOMPLETE WAPI.MAP_FLAG_EMAILATTACHMENTASFILE WAPI.MAP_FLAG_EMAILATTACHMENTASLINK WAPI.MAP_FLAG_RESUMEONRETURN WAPI.MAP_FLAG_SKIPWEEKENDS WAPI.MAP_FLAG_TEMPMAP |
Integer PrepareSubWork( WAPIWORK work, Integer mapID, [Integer flags] )
Sets up the work object to initiate the specified map as a subworkflow.
work | - | The WAPIWORK object handle. |
mapID | - | The ID of the desired Workflow Map. |
flags | - | Optional flag values to control the
map. The available values are: WAPI.MAP_FLAG_ARCHIVEONCOMPLETE WAPI.MAP_FLAG_DELETEONCOMPLETE WAPI.MAP_FLAG_EMAILATTACHMENTASFILE WAPI.MAP_FLAG_EMAILATTACHMENTASLINK WAPI.MAP_FLAG_RESUMEONRETURN WAPI.MAP_FLAG_SKIPWEEKENDS WAPI.MAP_FLAG_TEMPMAP |
Integer PrepareWork( WAPIWORK work, Integer mapID, [Integer flags] )
Sets up the work object to initiate the specified map as a workflow.
work | - | The WAPIWORK object handle. |
mapID | - | The ID of the desired Workflow Map. |
flags | - | Optional flag values to control the
map. The available values are: WAPI.MAP_FLAG_ARCHIVEONCOMPLETE WAPI.MAP_FLAG_DELETEONCOMPLETE WAPI.MAP_FLAG_EMAILATTACHMENTASFILE WAPI.MAP_FLAG_EMAILATTACHMENTASLINK WAPI.MAP_FLAG_RESUMEONRETURN WAPI.MAP_FLAG_SKIPWEEKENDS WAPI.MAP_FLAG_TEMPMAP |
Integer ReassignTask( WAPIWORK work, Integer workID, Integer subWorkID, Integer taskID, Integer userID )
Reassigns the task specified by the workID, subWorkID, and taskID to the given userID.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The subWorkID for the desired workflow. |
taskID | - | The taskID for the desired workflow task. |
userID | - | The ID of the user to which the task should be reassigned. |
Integer ReplaceMap( WAPIMAP map )
Saves the modified map definition to the map database replacing the original.
map | - | The WAPIMAP object handle. |
Integer ResumeWork( WAPIWORK work, Integer workID )
Sets the status of a suspended workflow to Executing.
This changes the Work_Status field of the workflow to WAPI.WORK_STATUS_EXECUTING.
Use a WAPIWORK object returned from a previous call to WAPI.AllocWork().
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
Integer SaveMap( WAPIMAP map)
Saves a WAPIMAP map definition to the map database.
map | - | The WAPIMAP object handle. |
Integer SetCallback( WAPISESSION session, Dynamic feature, [Dynamic object] )
Specifies the WAPI callback routine and context argument that is passed to the callback.
session | - | The WAPISESSION object handle. |
feature | - | The name of the script to execute. |
object | - | The optional object that contains the script. |
Integer SetWorkData( WAPIWORK work, Integer type, Integer subtype, [String description], Dynamic value )
Sets data stored in a data package.
work | - | The WAPIWORK object handle. |
type | - | The type of the data. |
subtype | - | The subtype of the data. |
description | - | The optional description of the data. |
value | - | The data to store. |
Integer StartTask( WAPIWORK work, Integer workID, Integer subWorkID, Integer taskID, Integer flags )
Marks the specified task as started and sets up the WAPIWORK object handle to be able to access the work package.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The subWorkID for the desired workflow. |
taskID | - | The taskID for the desired workflow task. |
flags | - | A flag for StartTask options. This
flag can be combined by Bitwise OR using the following constants: WAPI.STARTTASK_FLAG_REEXECUTE WAPI.STARTTASK_FLAG_NOAUDIT |
Integer StartWork( WAPIWORK work, [String title] )
Initiates a workflow that was prepared with a call to WAPI.PrepareWork() and readies any initial tasks.
work | - | The WAPIWORK object handle. |
title | - | The optional title of the Workflow. |
Integer StopWork( WAPIWORK work, Integer workID )
Sets the status of an Executing or Suspended workflow to Stopped.
This changes the Work_Status field of the workflow to WAPI.WORK_STATUS_STOPPED.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
Integer SuspendWork( WAPIWORK work, Integer workID )
Sets the status of an Executing workflow to Suspended.
This changes the Work_Status field of the workflow to WAPI.WORK_STATUS_SUSPENDED.
Use a WAPIWORK object returned from a previous call to WAPI.AllocWork().
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
Integer TaskAuditUserData( WAPIWORK work, Integer workID, Integer subWorkID, Integer taskID, Dynamic data, [Integer iterNum])
Adds a row to the audit trail and stores the specified data. Even though the iterNum parameter is optional, if not specified the iternum will be accessed from the appropriate Workflow database table by using the workID, subworkID and taskID. If you already have the iterNum, it is more efficient to pass it in instead of having the function access it.
work | - | The WAPIWORK object handle. |
workID | - | The work ID of the Workflow |
subworkID | - | The subwork ID of the Workflow |
taskID | - | The task ID of the task |
data | - | The data to store. |
iterNum | - | The optional iteration number for this specific task |
Integer TaskCancel( WAPIWORK work )
Notifies the workflow engine that work on this task is completed for the time being but skip marking the task as Done and send the workflow on to the next step.
work | - | The WAPIWORK object handle. |
Integer TaskDone( WAPIWORK work, [Dynamic linkType] )
Marks the task as Done and takes the paths from the task that are of the specified link type. If the linkType is not specified, then the True/Normal paths will be taken.
work | - | The WAPIWORK object handle. |
linkType | - | The optional type of link paths that should be taken from this step. |
Integer UpdateSubWorkAttribute( WAPIWORK work, Integer workID, Integer subWorkID, Integer attribute, Dynamic value )
Updates the value of a subWork attribute for a workflow.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The subWorkID for the desired workflow. |
attribute | - | Specifies a constant indicating
the subWork attribute. Acceptable values are: WAPI.SUBWORK_TITLE WAPI.SUBWORK_PROJECT WAPI.SUBWORK_FLAGS WAPI.SUBWORK_USERDATA WAPI.SUBWORK_CUSTOMDATA |
value |
-
|
The new value for the attribute. |
Integer UpdateSubWorkPrepare( WAPIWORK work, WAPIMAP map, Integer workID, Integer subWorkID )
Prepares the map and work object for a workflow already in-process for update. The new map definition is saved to the map database. The in-process workflow must be suspended in order for this call to succeed.
work | - | The WAPIWORK object handle. |
map | - | The WAPIMAP object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The subWorkID for the desired workflow. |
Integer UpdateSubWorkStart( WAPIWORK work )
Updates the in-process workflow specified by work. This is used after a call to WAPI.UpdateSubWorkPrepare(). Here, the work information is updated, and the workflow is made to now point to the new map definition.
work | - | The WAPIWORK object handle. |
Integer UpdateTaskAttribute( WAPIWORK work, Integer workID, Integer subWorkID, Integer taskID, Integer attribute, Dynamic value )
Updates the value of a task attribute for a workflow.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
subWorkID | - | The subWorkID for the desired workflow. |
taskID | - | The taskID for the desired task. |
attribute | - | Specifies a constant indicating the
task attribute. Acceptable values are: WAPI.SUBWORKTASK_TITLE WAPI.SUBWORKTASK_USERCOMMENT WAPI.SUBWORKTASK_PERFORMERID WAPI.SUBWORKTASK_USERSTATUS WAPI.SUBWORKTASK_FLAGS WAPI.SUBWORKTASK_USERDATA WAPI.SUBWORKTASK_CUSTOMDATA |
value | - | The new value for the attribute. |
Integer UpdateWorkAttribute( WAPIWORK work, Integer workID, Integer attribute, Dynamic value )
Updates the value of a work attribute.
work | - | The WAPIWORK object handle. |
workID | - | The workID for the desired workflow. |
attribute | - |
Specifies a constant indicating the work attribute. Acceptable
values are: |
value | - | The new value for the attribute. |
RecArray WorkList( WAPISESSION session, String viewName, Dynamic whereClause, Integer flags )
Returns workflow information using the specified view, SQL "where" clause, and flags. If specific workflow information is required, a view can be constructed in the database schema, and this call can be used to select rows from that view.
session | - | The WAPISESSION object handle. |
viewName | - | The view to do the select from |
whereClause | - | An SQL "where" clause if one is desired, 0 or Undefined if not. |
flags | - | Flag value for built-in "where" clauses.
These flags can be combined by Bitwise OR using the following
constants: WAPI.LIST_IFINITIATED WAPI.LIST_IFMANAGED WAPI.LIST_IFPERFORMER |
RecArray WorkList2( WAPISESSION session, String viewName, Dynamic whereClause, Dynamic orderby, Integer flags )
Returns ordered Workflow information using the specified view, SQL "where" clause, SQL “orderby” clause and flags. If specific Workflow information is required, a view can be constructed in the database schema, and this call can be used to select rows from that view.
session | - | The WAPISESSION object handle. |
viewName | - | The view to do the select from |
whereClause | - | An SQL "where" clause if one is desired, 0 or Undefined if not. |
orderby | - | An SQL "orderby" to order the results. |
flags | - | Flag value for built-in "where" clauses.
These flags can be combined by Bitwise OR using the following
constants: WAPI.LIST_IFINITIATED WAPI.LIST_IFMANAGED WAPI.LIST_IFPERFORMER |