Workflow

How to Automate Split Operators

 

What to do:

As a prerequisite for this example you must first create a process with a Split-OR operator!

Click Start > Workflow > Process Templates.
The Process Template mask is opened.
Search for a process that contains a split-OR operator.
Open the process in the Workflow Editor.
 

In the example the process is 861-Purchase Requisition.

Delete the resource PRC on the Split-OR operator and replace it by an automatic resource.

Double-click the operator.
The Activity properties mask is displayed.
Enter the name of the userexit (LogiView procedure) to be executed as a background batch process.
The LogiView procedure that has to be entered comprises the name of the LogicModel and the name of the procedure (LogicModel/Procedure), e.g. COP_MOD/CM_NEW_NUM).
Please note that with an automatic resource assigned to the Split-OR operator the LogiView procedure must be written in the In Background field as indicated below!

To confirm click OK.
Click to save the process.
Create the LogiView procedure.
  Example of a LogiView procedure:

Variablen:
EP_CID
EP_STR
EP_WFL_PRC_SEL_SUC

Source:

10 EP_WFL/GetProcessVariableString(EP_WFL_PRC_ID,"P",EP_STR)
20 EP_SYS_ROW = scan(EP_STR,"%d",RES)
30 if ( RES <= 500 )
40 EP_STR = "SMALLER_500"
50 elseif ( (RES > 500) & (RES <= 3000) )
60 EP_STR = "GREATER_500"
70 else
80 EP_STR = "GREATER_3000"
90 endif
100 EP_CID = 0
110 EP_WFL/GetTransitionByLabel(EP_WFL_PRC_ID, EP_WFL_ACT_ID, EP_STR, EP_CID)
120 if ( EP_CID != 0 )
130 upd_var(EP_WFL_PRC_SEL_SUC)
140 else
150 put_mes("LV504",EP_STR)
160 endif

Please note, that the costs along the transition lines have to be defined in the LogiView procedure!
  As soon as the process Purchase Requisition has been approved, the LogiView procedure will start as a background batch process. If the costs are <500, no approval is needed and the process will immediately continue with the activity Buy. If the costs are >500 or >3000, first the corresponding users (RUB or President) have to approve the costs before the activity Buy can be executed.
LogiView procedures are created via the Logic Models/Procedures mask (Manager>Macro>LogiView>Logic models).