Workflows
To provide a better understanding of how workflows are structured and used, the sections below contain some examples of workflow modeling. Sample files for the workflows and scripts used in the examples can be downloaded in zip format and imported.
- Modeling workflows: An example workflow is used to illustrate the process of creating and editing a project-specific workflow.
- Error handling: Defining an error status in the workflow model makes it possible to resolve errors that occur during transition switching. The error status catches all exceptions that occur when running the workflow.
- Deletion via workflows: A project-specific workflow for deleting elements can be directly connected to the existing "Delete" control elements, such as a tool bar or context menu.
- Within scripts, actions are run on specific project content using the FirstSpirit Access API. Unlike with standard functions (e.g. the standard “Delete” entry in the context menu), the developer of the workflow (or the associated scripts) has to ensure that all necessary boundary conditions, such as those for deleting an element, are also covered by the script. For most actions, write protection (“Lock”) has to be applied to the affected element as a minimum. However, the key factor here is the type of action that is to be performed on each particular element. No write protection has to be set for simply deleting an element such as a medium; however, it does need to be set for recursive deletion such as in the case of a page with sections.
The two sample workflows for the recursive locking or release of elements are RecursiveLock and RecursiveRelease. - Sample scripts: This page provides a number of script fragments for implementing frequently required functions.
- Form support: Forms for entering content can be used within workflows. The forms are defined within the workflow on the “Form” tab. While a workflow is running, the editor can enter values via the input components that have been defined in the form area. The saved values can be output in the workflow at a later time.
- Messages: Within a workflow, messages can be output to the user running it. Messages are output by means of scripts within the workflow.
- Persistent content: Within the "DoSelectCounting" activity, a counter can be incremented by a value of 1 each time a workflow is run. The value of the counter is saved and incremented by 1 as soon as the workflow is started again. The value is shown to the editor within an information dialog.