This page (revision-31) was last changed on 26-Nov-2021 10:22 by JEscott

This page was created on 26-Nov-2021 10:22 by JMyers

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
31 26-Nov-2021 10:22 11 KB JEscott to previous
30 26-Nov-2021 10:22 11 KB JEscott to previous | to last
29 26-Nov-2021 10:22 11 KB RForbes to previous | to last
28 26-Nov-2021 10:22 11 KB JEscott to previous | to last DEFINE_WF_USERCALC ==> DEFINE WF USERCALC
27 26-Nov-2021 10:22 11 KB JEscott to previous | to last
26 26-Nov-2021 10:22 11 KB JEscott to previous | to last
25 26-Nov-2021 10:22 11 KB JEscott to previous | to last
24 26-Nov-2021 10:22 11 KB JEscott to previous | to last
23 26-Nov-2021 10:22 11 KB JEscott to previous | to last
22 26-Nov-2021 10:22 11 KB JMyers to previous | to last
21 26-Nov-2021 10:22 11 KB JMyers to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 57 added one line
(Line 200 must also exist in this example)
At line 58 changed one line
(Line 200 must also exist in this example) It is useful to increment line numbers to the next 100 or 1000 at the start of each section of logic. This will make your UserCalc easier to read and maintain by future users. CMD Commands are used to perform operations within a UserCalc. Please refer to the User Calculations manual for a detailed description of the existing commands available. There are two commands that are available and strictly used for Workflow. These are: ACT and STOP. ACT This command is used to initiate a workflow action event. The workflow action event is created in IMWA and referenced in the UserCalc using this command. STOP This command is used to raise an exception to the user. This command should only be used to absolutely stop a save from taking place. It throws a database exception that displays the brief text in Operand 1 along with the stack trace of where it came from.
It is useful to increment line numbers to the next 100 or 1000 at the start of each section of logic. This will make your UserCalc easier to read and maintain by future users.
At line 61 added 8 lines
;[CMD|]:Commands are used to perform operations within a UserCalc.
%%information Please refer to the User Calculations manual for a detailed description of the existing commands available.%%
There are two commands that are available and strictly used for Workflow. These are: ACT and STOP.
|ACT |This command is used to initiate a workflow action event. The workflow action event is created in [IMWA] and referenced in the UserCalc using this command.
|STOP| This command is used to raise an exception to the user. This command should only be used to absolutely stop a save from taking place. It throws a database exception that displays the brief text in Operand 1 along with the stack trace of where it came from.
At line 62 changed one line
Type 1 (Operand Type 1) Operands must have a type. For example, DB, AC, V, etc… Please refer to the User Calculations manual for a detailed description of the existing operand types available. The following table indicates five special operand types that are available for workflow. Old Value (OV) This refers to the Old Value of the item being referenced in the Operand. New Value (NV) This refers to the New Value of the item being referenced in the Operand. Action Code (AC) This refers to the name of the workflow action code (Type 1 only) Database Value (DB) This refers to other database columns that are available based on the Product Tables (IMPT) records. Recipient Type (RT) This describes who will be in receipt of this action event as defined in the IMWA (Maintain Workflow Actions) screen (Type 3 only).
;[Type 1 (Operand Type 1)|]:Operands must have a type. For example, DB, AC, V, etc…
At line 64 changed one line
The Type 1 field will always default to the value "AC", if the "ACT" command is used. Operand 1 Operand 1 is typically used to store the result of any line of a UserCalc, or to compare to a value in Operand2. Line CMD Type 1 Operand 1 OPER Type 2 Operand 2 Type 3 Operand 3 If GOTO Else GOTO 200 ACT AC NEW EE EMAIL LOG $S CURRENT-DATE RT Manager 300
%%information Please refer to the User Calculations manual for a detailed description of the existing operand types available.%%
At line 66 changed one line
In the case were the CMD is ACT, Operand1 displays the name of the workflow action event that was created in IMWA. Clicking on the "Operand 1" LOV button will bring up a list from which a selection can be made. OPER Operators are the actions that need to be taken in regards to the command being issued and the operands indicated. i.e. Add, Divide, convert to a Character, Beginning of Day, etc. Please refer to the User Calculations manual for a detailed description of the existing operators that are available. The LOG Operator is a new operator that is available strictly for Workflow and ONLY for the ACT CMD; it is used to log the workflow action event. When the "ACT" command is selected this value automatically defaults into this field. Type 2 (Operand Type 2) Please refer to the User Calculations manual for a detailed description of the existing operand types that are available. In most cases, when the "ACT" command is selected, this field will need to refer to an operand type that references a constant. Typically the operand type used is $S - System Constant. Operand 2 Operand 2 is used to compare values or assign values. Please refer to the User Calculations manual for a detailed description of the existing operands that are available. With respect to the ACT CMD, this field will hold a date value. Once the value in Type 2 has been entered, click on the Operand 2 LOV button to obtain a list of values to choose from. Type 3 Please refer to the User Calculations manual for a detailed description of the existing operand types that are available. When the "ACT" command is selected, "RT" will always default in. RT refers to 'Recipient Type'. Operand 3 Please refer to the User Calculations manual for a detailed description of the existing operands that are available. This field indicates the recipient who is to receive this workflow action event. Depending on what event recipient is selected in IMWA a list of values is available once the Operand3 button is clicked. If GOTO Please refer to the User Calculations manual for a detailed explanation. The two new workflow commands ACT and STOP require an "If GOTO" value to be indicated. Else GOTO Please refer to the User Calculations manual for a detailed explanation. The two new workflow commands ACT and STOP do NOT take an "Else GOTO" value. Description This is the area where the user will write the messages to be used in the Workflow Action Events (i.e. emails or online messages). In the example above, the UserCalc calls the workflow action "NEW EE EMAIL" at line 200. This action has been set up to notify a manager, via email of a new hire (done in IMWA). The actual content of the email is taken from the 'Description' section. This text is customizable. In this example, the employee's name, hire date and Assignment title are stated in the email sent to the manager. This information is referenced (within double brackets << >>) in the notes section. The field is built with the table alias and column name. Note that it must be a table that is accessible via either the NV/OV or DB Types. The email from the example above that is received by the manager will look similar to: … This e-mail notification has been sent to you from the Human Resources system, to inform you that Jack Smith has joined our organization. Jack is scheduled to begin work on 01-Feb-2007 as a Patient Care Manager.… The following items are examples of what can be referenced in the Description; they MUST be referenced as follows: <<eid.first_name>> - states the employee's first name <<eid.last_name>> - states the employee's last name <<eem.hire_date>> - states the employee's hire date
The following table indicates five special operand types that are available for workflow.
At line 77 added 5 lines
|Old Value (OV)| This refers to the Old Value of the item being referenced in the Operand.
|New Value (NV)| This refers to the New Value of the item being referenced in the Operand.
|Action Code (AC)| This refers to the name of the workflow action code (Type 1 only)
|Database Value (DB)| This refers to other database columns that are available based on the Product Tables ([IMPT]) records.
|Recipient Type (RT)| This describes who will be in receipt of this action event as defined in the Maintain Workflow Actions [IMWA] screen (Type 3 only).
At line 83 added 16 lines
%%information The Type 1 field will always default to the value "AC", if the "ACT" command is used.%%
;[Operand 1|]:Operand 1 is typically used to store the result of any line of a UserCalc, or to compare to a value in Operand2.
||Line||CMD||Type 1||Operand 1||OPER||Type 2||Operand 2||Type 3||Operand 3||If GOTO||Else GOTO
|200|ACT|AC|NEW EE EMAIL|LOG|$S|CURRENT-DATE|RT|Manager|300|
In the case were the CMD is ACT, Operand1 displays the name of the workflow action event that was created in [IMWA].
Clicking on the "Operand 1" LOV button will bring up a list from which a selection can be made.
;[OPER|]:Operators are the actions that need to be taken in regards to the command being issued and the operands indicated.:;i.e. Add, Divide, convert to a Character, Beginning of Day, etc. %%information Please refer to the User Calculations manual for a detailed description of the existing operators that are available.%% :;The LOG Operator is a new operator that is available strictly for Workflow and ONLY for the ACT CMD; it is used to log the workflow action event. :;When the "ACT" command is selected this value automatically defaults into this field.
;[Type 2 (Operand Type 2)|]:
%%information Please refer to the User Calculations manual for a detailed description of the existing operand types that are available.%% In most cases, when the "ACT" command is selected, this field will need to refer to an operand type that references a constant. Typically the operand type used is $S - System Constant. Operand 2 Operand 2 is used to compare values or assign values. Please refer to the User Calculations manual for a detailed description of the existing operands that are available. With respect to the ACT CMD, this field will hold a date value. Once the value in Type 2 has been entered, click on the Operand 2 LOV button to obtain a list of values to choose from. Type 3 Please refer to the User Calculations manual for a detailed description of the existing operand types that are available. When the "ACT" command is selected, "RT" will always default in. RT refers to 'Recipient Type'. Operand 3 Please refer to the User Calculations manual for a detailed description of the existing operands that are available. This field indicates the recipient who is to receive this workflow action event. Depending on what event recipient is selected in IMWA a list of values is available once the Operand3 button is clicked. If GOTO Please refer to the User Calculations manual for a detailed explanation. The two new workflow commands ACT and STOP require an "If GOTO" value to be indicated. Else GOTO Please refer to the User Calculations manual for a detailed explanation. The two new workflow commands ACT and STOP do NOT take an "Else GOTO" value. Description This is the area where the user will write the messages to be used in the Workflow Action Events (i.e. emails or online messages). In the example above, the UserCalc calls the workflow action "NEW EE EMAIL" at line 200. This action has been set up to notify a manager, via email of a new hire (done in IMWA). The actual content of the email is taken from the 'Description' section. This text is customizable. In this example, the employee's name, hire date and Assignment title are stated in the email sent to the manager. This information is referenced (within double brackets << >>) in the notes section. The field is built with the table alias and column name. Note that it must be a table that is accessible via either the NV/OV or DB Types. The email from the example above that is received by the manager will look similar to: … This e-mail notification has been sent to you from the Human Resources system, to inform you that Jack Smith has joined our organization. Jack is scheduled to begin work on 01-Feb-2007 as a Patient Care Manager.… The following items are examples of what can be referenced in the Description; they MUST be referenced as follows: <<eid.first_name>> - states the employee's first name <<eid.last_name>> - states the employee's last name <<eem.hire_date>> - states the employee's hire date