# Workflow

## How to Automate Activities

| ### What to do:
| As a prerequisite for the following example you must have created a process with at least two activities.
| How to Add and Connect Components
| In the example the process is 863 -Order.
| Activities can be automated to avoid the delay of processes, e.g. due to the absence of resources. To automate activities, the following is needed: A table including the main resources and 2-3 representatives for the resource assigned to a specific activity A LogiView procedure that determines the resources from the next activity, checks the presence and, if necessary, replaces the resource by representatives defined in the table.
| Click Start > Workflow > Processes in Definition. The Process in Definition mask is opened.
| Activities can also be automated in process templates. In this case click Manager > Workflow > Process Templates.
| Search for the process 863-Order.
| Click . The Workflow Editor is opened, displaying the Order process in the Grapher view window.
| In the process depicted above, the activity Delivery is to be automated.
| Double-click Delivery. The Activity properties window is opened.
| Enter the name of the userexit (LogiView procedure) in the In Background field.
| To confirm click OK.
| In this example the Userexit (LogiView procedure) will check if the resource assigned to the activity (user DEMOEP_M) is available in order to execute the action. If DEMOEP_M is not available, the Userexit will check the table and determine representatives of user DEMOEP_M who will then perform the action.
| Further information about resources and userexits are displayed in the Activities tab of the process mask.
| The userexit (LogiView procedure) entered in the Activity properties mask will be displayed in the In Background column of the Activities tab.
| Please note that for a background activity the resource type "Automatic" must be assigned. There won't be an entry in the Resource column since a resource (user) can't be assigned to the resource type "automatic"!
| The userexit in the field On Complete is executed synchronously and must be completed before other functions can be executed! The userexit in the field In Background is executed asynchronously and allows the parallel execution of other functions!
| When assigning an automatic resource to an activity, it is also required to assign a LogiView procedure with a userexit in the background to this activity!