AttachWorkflow client API - HxGN SDx - Update 63 - Administration & Configuration

Administration and Configuration of HxGN SDx

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

The AttachWorkflow client API allows you to attach an instance of a workflow template to a document. Methods using this API can be used with multiple documents at once, attaching a different instance of the same workflow template to each document.

The Allow edit after attach parameter on this method allows you to specify whether the software automatically opens the workflow definition for editing after attaching it to the document, allowing you to immediately edit information like the order of steps or the step recipients. By default, this parameter is set to False.

By default, the Run in asynchronous mode parameter is set to NULL, which means that when you attach a single object to a workflow, the attach action is immediately processed synchronously, and you then must wait for the attach action to finish before you can perform other tasks. When you attach multiple objects to a workflow, the software creates the relationships asynchronously in the background, allowing you to continue working.

By changing the value of the Run in asynchronous mode parameter defined for the method you are using to attach workflows, you can change this behavior:

  • When you set the Run in asynchronous mode parameter to True, both single objects and multiple objects are attached to a workflow asynchronously in the background. This creates a notification object for each attach action so you can view the progress and continue working.

  • When you set the Run in asynchronous mode parameter to False, both single objects and multiple objects are attached to a workflow synchronously and you must wait for the attach process to finish before you can continue working.

  • As mentioned previously, when the Run in asynchronous mode parameter is set to NULL, single objects are processed synchronously, but multiple objects are processed asynchronously.

Argument

Description

Parameter 1

Allow edit after attach (Not Supported in the Web Client)

Parameter 1 description

When set to True, the system will automatically open the workflow definition in an editable form so that you can modify the workflow for use with the associated document. When set to False, the workflow definition instance is attached, but the form for editing is not opened. The workflow definition is editable, but the form does not open automatically.

Parameter 1 type

Boolean

Parameter 1 default

False

Parameter 2

Run in asynchronous mode

Parameter 2 description

Indicates whether the creation of the workflow definitions and instances of the relationships between the definitions and the objects will happen in the background. When set to True, the process is completed in the background. When set to False, the process will not happen in the background, and you must wait for the process to be completed before starting other tasks. When set to NULL, multi-selected documents associated with a workflow will be processed in the background, but single documents will not.

Parameter 2 type

Boolean

Parameter 2 default

None

Parameter 3

Workflow processing option

Parameter 3 description

  • For Desktop Client - The option selected determines whether or not creation or revision wizards should include a workflow page to choose a workflow to attach to the object. For example, None, which is the default option, indicates that no workflow page appears and no workflow is attached to the object. Other options include Select, SelectRequired, or a named workflow. For more information on the options, see Configure create object to attach workflow.

  • For Web Client - There is no workflow selection in the create pages. The Web Client chooses the applicable workflow unless a named workflow is specified. However, if more than one applicable workflow is found, the software does not attach any workflow to the object.

Parameter 3 type

String

Parameter 3 default

None

Parameter 4

User notification message

Parameter 4 description

Provide text that will appear in a confirmation dialog box when an object is automatically associated with a workflow definition specified in Parameter 3.

Parameter 4 type

String

Parameter 4 default

None

The following methods use the AttachWorkflow client API to associate an object with an instance of a workflow definition.

  • AttWFlow

  • AttWFlowNoEdit

  • AttWFlowNoEditAutoName

  • AttWFlowNoEditAutoUID

  • AttWFlowNoEditInvalid