close

Filter

loading table of contents...

Workflow Manual / Version 2301

Table Of Contents

4.4.1 Predefined Action Classes

These are the predefined action classes which can be performed in tasks. They can be used with the elements <Action>, <EntryAction> and <ExitAction> by specifying the name of the action class as the class attribute of the respective action element.

If an action is described as applying to one resource in an atomic variable, it can be applied to a set of resources in an aggregation variable, too.

All predefined action classes discussed here support the following additional attributes to be specified as part of the action element:

Attribute

Type

Default

Description

class

NMTOKEN

#REQUIRED

the name of the action

successVariable

NMTOKEN

#IMPLIED

the name of a Boolean variable that will represent whether the action was successfully executed

resultVariable

NMTOKEN

#IMPLIED

the name of a variable that will receive a possible result of the action, if any

Table 4.3. Attributes common to all actions


Furthermore, every predefined action may contain a Condition element, which will be evaluated to determine whether the action should be executed at all.

Actions can be divided into server actions which are running solely on server-side and client actions (based on the class AbstractClientAction) which are running on client and server-side.

Client-side actions

Client action classes that are used to modify resources on the GUI Client respond to the following attributes:

Attribute

Type

Default

Description

gui

(Boolean)

"true"

Defines whether a GUI element will be shown on execution of the action ("true") or not. For instance, executing publishResources with gui="false" will not show the publication window.

ignoreErrors

(Boolean)

"false"

If set to "true", this attribute makes sure that the task containing the action will continue normally after an error was encountered.

timeout

NMTOKEN

"30"

The timeout in seconds for the action. The default timeout is 30 seconds.

Table 4.4. Attributes of client-side actions.


ApproveResource

Use this action to approve one or more CoreMedia resources referenced by a variable. If the variable stores an explicit version, that version is approved and a place approval takes place. If no version information is present, only the place of the resource is approved.

Attribute

Type

Default

Description

resourceVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the resource(s) to be approved

Table 4.5. Attributes of the ApproveResource action.


CheckInDocument

Use this action to check-in one or more CoreMedia content items referenced by a variable.

Attribute

Type

Default

Description

documentVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the document(s) to be checked in

Table 4.6. Attributes of the CheckInDocument action.


CheckOutDocument

Use this action to check-out one or more CoreMedia content items referenced by a variable.

Attribute

Type

Default

Description

documentVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the content item(s) to be checked out

Table 4.7. Attribute of the CeckOutDocument action.


CopyResource

Use this action to copy a resource to a specified folder.

Attribute

Type

Default

Description

sourceVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the resource to be copied

destinationVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the folder where the copied resource should be located

Table 4.8. Attributes of the CopyResource action.


CreateDocument

Use this action to create a new content item in a specified folder.

This element may contain any number of Property elements that specify initial property values for the newly created content item.

Attribute

Type

Default

Description

folderVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the folder where the resource should be created

nameVariable

NMTOKEN

#REQUIRED

the name of the string variable that contains the name to be used

typeVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the content type for which a content item should be created

Table 4.9. Attributes of the CreateDocument action.


CreateFolder

Use this action to create a new folder in a specified parent folder.

Attribute

Type

Default

Description

folderVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the existing folder in which the new folder should be created

nameVariable

NMTOKEN

#REQUIRED

the name of the string variable that contains the name to be used

Table 4.10. Attributes of the CreateFolder action.


DeleteResource

Use this action to mark a resource for deletion.

Attribute

Type

Default

Description

resourceVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the resource(s) to be marked for deletion

Table 4.11. Attribute of the DeleteResource action.


DisapproveResource

Use this action to disapprove one or more CoreMedia resources referenced by a variable. If the variable stores an explicit version, that version is disapproved. If no version information is present, the most recent version will be disapproved.

Attribute

Type

Default

Description

resourceVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the resource(s) to be disapproved

Table 4.12. Attribute of the DisapproveResource action.


MoveResource

Use this action to move a resource to another folder.

Attribute

Type

Default

Description

sourceVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the resource to be moved

destinationVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the destination folder for the move

Table 4.13. Attributes of the MoveResource action.


OpenDocument

Use this action to open a content item in the editor.

Attribute

Type

Default

Description

documentVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the content item to open

Table 4.14. Attribute of the OpenDocument action.


PublishResources

Use this action to publish one or more CoreMedia resources referenced by a variable. If the variable stores an explicit version, that version is published. If no version information is present, the most recent version will be published.

The aggregation variables resultVariable, codeVariable, parameterVariable, and versionVariable jointly represent the result of the publication.

Attribute

Type

Default

Description

codeVariable

NMTOKEN

#REQUIRED

an integer aggregation variable

ignorePublicationErrors

(Boolean)

"false"

Defines whether an unsuccessful publication should be ignored

parameterVariable

NMTOKEN

#REQUIRED

a string aggregation variable

resourceVariable

NMTOKEN

#REQUIRED

Defines the name of the variable that contains the resource(s) to be published

versionVariable

NMTOKEN

#REQUIRED

an integer aggregation variable

Table 4.15. Attributes of the PublishResources action.


RenameResource

Use this action to rename a resource.

Attribute

Type

Default

Description

resourceVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the resource to be renamed

nameVariable

NMTOKEN

#REQUIRED

the name of the string variable that provides the new name of the resource

Table 4.16. Attributes of the RenameResource action.


SaveDocument

Use this action to save a content item that has to be opened in the Client GUI.

Attribute

Type

Default

Description

documentVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the content item to be saved

Table 4.17. Attribute of the SaveDocument action.


StoreProperties

Use this action to store property values in a content item. The property name and value are defined using the subelement Property.

Attribute

Type

Default

Description

documentVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the content item

Table 4.18. Attribute of the StoreProperties action.


UncheckOutDocument

Use this action to revert the check out of one or more CoreMedia content items referenced by a variable.

Attribute

Type

Default

Description

documentVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the checked-out content item(s)

Table 4.19. Attribute of the UncheckOutDocument action.


UndeleteResource

Use this action to remove the deletion from a resource.

Attribute

Type

Default

Description

resourceVariable

NMTOKEN

#REQUIRED

the name of the variable that contains the deleted resource(s)

Table 4.20. Attribute of the UndeleteResource action.


Server-side actions

While actions on the client-side deal with resources of the Content Management Server, actions on the server-side work on workflow objects in the Workflow Server.

ArchiveProcess

Caution

Caution

The ArchiveProcess action is deprecated and should not be used anymore. It's recommended to use ArchiveProcessFinalAction instead, which can also archive data of aborted processes. See Section 4.4.2, “Predefined FinalAction Classes” for its description.

Use this action in the final task of a process to archive data of the process before it completes and gets destroyed in the Workflow Server. If the RegisterPendingProcess action was used before to add the process to some users' lists of pending processes, then these users can view the completed process in Studio's Control Room.

The action can store the process data to a MongoDB database. To configure it, set the properties mongodb.client-uri, mongodb.prefix and repository.caplist.connect in the Workflow Server. See Section 6.1, “Configuration Reference” for a description of these properties.

Attribute

Type

Default

Description

maxProcessesPerUser

NMTOKEN

(unlimited)

The maximum number of processes to show in the list of finished processes in Studio's Control Room. This attribute should be set to the same value for all ArchiveProcessFinalAction and ArchiveProcess actions in different workflow definitions, because all processes are stored in the same list.

Table 4.21. Attributes of the ArchiveProcess action.


Example:

The task will escalate if the process cannot be archived successfully, for example if MongoDB is down. Because of this it is recommended to retry the task as in this example:

<Variable name="finishTaskRetryTimer" type="Timer"/>
<TimerHandler class="RetryTaskTimerHandler"
              task="Finish"
              timerName="finishTaskRetryTimer"/>

<AutomatedTask name="Finish" final="true">
  <Action class="AssignVariable"
          resultVariable="finishTaskRetryTimer">
    <Timer value="30"/>
  </Action>
  <Action class="EnableTimer" timerVariable="finishTaskRetryTimer"/>
  <Action class="ArchiveProcess" maxProcessesPerUser="100"/>
</AutomatedTask>

        

Example 4.18. Example of the ArchiveProcess action


AssignVariable

Use this action to assign a new value to a variable. It takes a list of expressions (that evaluate to a WfValue) via the Expression subelement or WfValues via the Boolean, Date, String etc. subelements.

Example:

This example will assign Integer values to the variable defined via the attribute resultVariable.

<Action class="AssignVariable" resultVariable="resultVariable">    
    <Read variable="firstVariable" property="version_"/>
    <Expression class="AddLatestVersion">
      <Get variable="secondVariable"/>
    </Expression>
    <Integer value="4711"/>
</Action>

Example 4.19. Example of the AssignVariable element


DisableTimer

Use this action to disable a timer.

Attribute

Type

Default

Description

timerVariable

NMTOKEN

#REQUIRED

the variable that contains the timer that should be disabled

Table 4.22. Attribute of the DisableTimer action.


EnableTimer

Use this action to enable a timer. Note, that a timer has to be enabled before it may expire later.

Attribute

Type

Default

Description

timerVariable

NMTOKEN

#REQUIRED

the variable that contains the timer that should be enabled

Table 4.23. Attribute of the EnableTimer action.


ExcludePerformer

Use this action to exclude the performer of the current task from performing another specified task. When the specified task coincides with the current task, the exclusion will take effect when the task is reached the next time.

Attribute

Type

Default

Description

task

NMTOKEN

#Implied

current task

the name of the task for which an exclusion should be established

Table 4.24. Attribute of the ExcludePerformer action.


ExcludeUser

Use this action to exclude a configured user from performing another specified task. When the specified task coincides with the current task, the exclusion will take effect when the task is reached the next time.

Attribute

Type

Default

Description

task

NMTOKEN

#Implied

current task

the name of the task for which an exclusion should be established

userVariable

NMTOKEN

#IMPLIED

performer

The variable which contains the user who should be excluded.

Table 4.25. Attribute of the ExcludeUser action.


ForceUser

Use this action to preset a user as the performer of a task. The task will be automatically accepted by the Client GUI for the user.

Example:

<AutomatedTask name="AssignComposer" description="assignUser" 
 successor="Compose">
 <Action class="ForceUser" task="Compose" userVariable="OWNER_"/>
</AutomatedTask>

Example 4.20. How to force a user


Attribute

Type

Default

Description

task

NMTOKEN

#IMPLIED

current task

The task for which the user is predefined.

userVariable

NMTOKEN

#IMPLIED

performer

The variable which contains the user who should accept the task.

Table 4.26. Attributes of the ForceUser action.


Log

Use this action to write output to the log. The log name can be defined using the facility attribute. You can write text to the output defined via the attribute message. Using the subelement Get you can output the content of variables. Define the log level using the attributes debug, info, warning, or error (see Section 4.7, “Logging” in Operations Basics for details on the logging).

Attribute

Description

debug|info|warning|error

Defines the log level "debug", "info", "warning", or "error". Value must be "true".

message

The message which is printed to the log.

facility

Define a different log facility for the output.

The default log facility contains both the process and the task name. For example, the following entry in the Workflow Server's Logback configuration would match all info output of MyProcess workflows:

<logger name="workflow.actions.log.MyProcess" additivity="false" level="info">
  <appender-ref ref="file" />
</logger>

                

Table 4.27. Attributes of the Log action.


<Task ...>
  <Action class="Log" info="true" message="Enter task with x  ">
    <Get variable="x"/>
  </Action> </Task>
</Task>

Example 4.21. How to use a log action


PreferPerformer

Use this action to set the performer of the current task as the preferred performer of another task. When the given task coincides with the current task, the preference will take effect when the task is reached the next time.

Attribute

Type

Default

Description

task

NMTOKEN

#IMPLIED

current task

the name of the task for which a preference should be established

Table 4.28. Attribute of the PreferPerformer action.


RegisterPendingProcess

Use this action to add the process to a user's pending processes list that is shown in Studio's Control Room.

The action stores the user's pending processes to a MongoDB database. To configure it, set the properties mongodb.client-uri, mongodb.prefix and repository.caplist.connect in the Workflow Server. See Section 6.1, “Configuration Reference” for a description of these properties.

Attribute

Type

Default

Description

userVariable

NMTOKEN

#IMPLIED

the performer of a UserTask or the process owner if not used in a UserTask

the variable which contains the user to whose list of pending processes the process should be added to

Table 4.29. Attributes of the RegisterPendingProcess action.


CancelUserTask

Use this action to cancel an activated user task.

Attribute

Type

Default

Description

task

NMTOKEN

#IMPLIED

current task

The name of the user task to cancel.

Table 4.30. Attribute of the CancelUserTask action.


SkipUserTask

Use this action to skip an activated user task.

Attribute

Type

Default

Description

task

NMTOKEN

#IMPLIED

current task

The name of the user task to skip.

Table 4.31. Attribute of the SkipUserTask action.


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.