The Content Server Workflow Customization - The WAPI Package (OScript) Part III of III - Class Methods (U-W)
WAPI III/III - made by the Easy Diffusion AI

The Content Server Workflow Customization - The WAPI Package (OScript) Part III of III - Class Methods (U-W)

Class: WAPI

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.

This is, due to the length from U (UpdateSubWorkAttribute) to W (WorkList2) with the four WAPI object handles used with the WAPI functions: WAPIMAP, WAPIMAPTASK , WAPIWORK, WAPISUBWORK

Class Methods

Article content
U-W Class Me



UpdateSubWorkAttribute

Integer UpdateSubWorkAttribute( WAPIWORK work,   Integer workID,   Integer subWorkID,   Integer attribute,   Dynamic value ) Updates the value of a subWork attribute for a workflow.

Parameters

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. Values are:

  • WAPI.SUBWORK_TITLE
  • WAPI.SUBWORK_PROJECT
  • WAPI.SUBWORK_FLAGS
  • WAPI.SUBWORK_USERDATA
  • WAPI.SUBWORK_CUSTOMDATA

value - The new value for the attribute.

Returns:

(Integer 0) if successful; Error otherwise.


UpdateSubWorkPrepare

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.

Parameters

work - The WAPIWORK object handle.

map - The WAPIMAP object handle.

workID - The workID for the desired workflow.

subWorkID - The subWorkID for the desired workflow.

Returns:

(Integer 0) if successful; Error otherwise.


UpdateSubWorkStart

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.

Parameters

work - The WAPIWORK object handle.

Returns:

(Integer 0) if successful; Error otherwise.


UpdateTaskAttribute

Integer UpdateTaskAttribute( WAPIWORK work, Integer workID,  Integer subWorkID,                              Integer taskID,                              Integer attribute,                              Dynamic value )

Updates the value of a task attribute for a workflow.

Parameters

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.

Returns:

(Integer 0) if successful; Error otherwise.

UpdateWorkAttribute

Integer UpdateWorkAttribute( WAPIWORK work,                              Integer workID,                              Integer attribute,                              Dynamic value )

Updates the value of a work attribute.

Parameters

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.

Returns:

(Integer 0) if successful; Error otherwise.

WorkList

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.

Parameters

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

Returns:

A RecArray of work information if successful; Error otherwise.

WorkList2

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.

Parameters

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

Returns:

A RecArray of work information if successful; Error otherwise.

To view or add a comment, sign in

More articles by Reiner Merz

Others also viewed

Explore content categories