Workflow Procedures

Fundamental workflow procedures include creating a workflow template, creating a new workflow from a template, and processing a workflow.

Each of the fundamental workflow procedures are discussed in turn in the following sections.

Creating A Workflow Template

Workflow designers and modelers can create workflow templates. A workflow template consists of templates for individual workflow actions and connections between the individual workflow actions. The connections are called options and also define the potential results of an action. Which action is triggered after a given action depends on the option selected. The workflow template defines the basic sequence in which individual actions have to be processed via options. In short, the workflow extension uses two kinds of templates to represent workflow models:

  • Workflow action templates, which represent the individual steps of a workflow.

  • Options, which represent the connections between individual steps.

The workflow extension also allows you to define conditions on options. If two or more options link to the same workflow action template, you can set the incoming connection to be OR-connected or AND-connected.

  • On OR-connected options, the target workflow action template is activated if at least one of the incoming options is set to the respective value later on.

  • On AND-connected options, the target workflow action template is activated only if all of the incoming options are set to the respective value later on.

A workflow action template can also be set to send an email notification: if the action, which is copied from the workflow action template, is activated (that is, the action's preceding actions are completed), then an email is sent to the assignee (using the SAP Commerce email settings). Whether or not an email is sent can be set for the action at any time.

The workflow extension also distinguishes between three different types of workflow action templates in a workflow template. Each workflow action template is marked as one of three possible states: start, normal, and end.

Workflow action templates marked as start represent the beginning points of a workflow. Workflow action templates marked as end represent the completion points of a workflow. Workflow actiontemplates marked as normal represent actions that are neither beginning points nor completion points of a workflow.

Type of Workflow Action Template

Description

How to identify in an Activity Diagram?

start

Beginning points of a workflow.

  • Every step that is in the first row of a workflow

  • Every step whose direct ancestor is an initial node

normal

Neither beginning points nor completion points of a workflow.

  • Every step that is neither in the first row of a workflow nor in the last row of a workflow

  • Every step whose direct ancestor is not an initial node and whose direct successor is not an activity final node

end

Completion points of a workflow.

  • Every step that is in the last row of a workflow

  • Every step whose direct successor is an activity final node

  • If a workflow action template is marked as start, then the status of the workflow action copied from this workflow action template is set to in progress automatically. In addition, every workflow action with no subsequent workflow action is automatically set to completed.

  • If no workflow action template of a workflow is marked as start, then the status of all workflow actions is automatically set to pending.

  • If a workflow reaches any workflow action marked as end, every single workflow action in the workflow is marked to be ENDED THROUGH END OF WORKFLOW. This means that the entire workflow is completed once the first workflow action marked as end is reached.

Creating A Workflow From A Workflow Template

Workflow managers can create a wWorkflow from a workflow template manually or have copies created automatically via the activation script. A workflow template is used as a blueprint for an actual workflow. The workflow template is copied into a workflow, creating copies of all related objects in the process (such as actions, options, etc). In essence, the workflow is a working copy of the workflow template, and all objects referenced by the workflow template are working copies, too. It is not possible to change the basic action sequence pre-defined by the workflow template.

In addition, attachments can be added to the workflow. An attachment is a reference to an item in the SAP Commerce that is intended to be reviewed in the course of the workflow--a modified product or category, for example.

A workflow action has a status indicating its processing state. If a workflow actiont template is marked as start, the status of the workflow action copied from this workflow action template is set to in progress automatically. In addition, every workflow action with no subsequent workflow action is automatically set to completed.

If no workflow action template of a workflow is marked as start, then the status of all workflow actions is automatically set to pending.

For information about available statuses, see Workflow Actions>

Processing A Workflow

An action can be assigned to a user or user group. The user or any member of the user group can then work on the action. By selecting an option from the list of potential decisions (the result of the action, so to speak), the user triggers the next action. Which action that is depends on the sequence of actions as predefined by the workflow template and the selected option.

Generally, actions are processed from an action marked as start to an action marked as end via any number of actions marked as normal. This does not have to be a direct or uninterrupted path; some actions may be processed several times, while other actions may not be processed at all.

If a workflow action is assigned to a user account to process, the workflow action shows up in the user account's Inbox in the Backoffice. The Inbox allows a user to quickly see the workflow actions assigned to them. In addition, a workflow action can also be set to send an email notification: if the action is activated (that is, the action's preceding actions are completed), then an email is sent to the assignee (using SAP Commerce email settings). Whether or not an email is sent can be set for the action at any time.