The Workflow rules are used to define the execution of a number of actions when specific events occur within the Sage X3 software.

The possible actions are :

  • the sending of messages by the e-mail system
  • the display of notifications in planning workbenches
  • the updating of data via the execution of actions, either directly when the event occurs or later when the recipient(s) of the notification will have performed an action (visa or signature action in the planning workbench, click on a link in the message, double-click to connect to a linked context and perform updates manually)

Data coming from the triggering context may be used in the messages, notifications and actions.

There are very different events which can trigger a Workflow rule :

  • action of the user in object management mode (creation, modification, triggering of an action)
  • execution of a batch task, an import, a report
  • signature action on a prior notification (in that case, it is possible to have complex nested signature circuits)
  • batch process running through a group of tables in the database  

The sending of e-mails is dependent on the use of an e-mail system accepting a MAPI interface when sending from the client workstation or SMTP POP3 when the message is sent from the server (this is the case for the majority of e-mail systems available on the market).

The recipients of the Workflow notifications can be directly set up in the rule, either via a user code or via a BP code and a contact type at the BP's. It is also possible to create multi-criteria tables called allocation rules that enable a BP user to specify the recipients on the basis of predefined criteria values.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

The setup screen of the Workflow rules is comprised of 5 tabs, with the first three concerning the basic setup (in simple notification cases, the main fields of these three tabs need to be documented) and the other two enabling an advanced setup :

  • The first tab is used to define the triggering context of the rule.
  • The second tab inidcates the list of recipients of the message or the notifications.
  • The third tab is used to enter the body of the message, when a message needs to be sent, and add possible enclosings.
  • The fourth tab is used to define any possible signature conditions when a Workflow rule supposes a chain of later steps and a signature process.
  • The fifth tab is used when it is necessary to trigger specific actions (what is understood by action is standardized sub-programs, either predefined and documented, like for instance, actions linked with a budget commitment, or specific and carried out by an integrator to meet a particular requirement).

Header

A rule is identified by means of a code but, for organization purposes, it may be associated with a category defined in a miscellaneous table. This is therefore the information that can be found in the screen header.

Tab General

This tab defines the triggering context, specified by a type of event and an associated code along with, in some cases, additional operation codes. There also is a conditions grid: these conditions must be verified for the rule to be triggered. Since some events act upon data organized according to a header and line structure, it is necessary to specify about which level each of these conditions are.

It is also possible to associate a rule with a data template which describes a group of additional tables which will be read when the rule is tested. For a rule whose type is Manual, this data template is mandatory, since the only existing context is linked with this template. For rules linked with objects or miscellaneous events, this model is optional, and is simply used to fill the on line tables.

Depending on the type of rule and the template associated to it, it is possible to specify if the workflow should be about the header information or the line information, and, if need be, the manner in which to group the lines.

Finally, an allocation rule can be set to specify how the recipients of the message will be defined. Such a rule can send back one or several recipients. The concerned recipients may receive the notification coming from the rule or may be transmitted to the next rule, in case of a signature sequence.

A technical appendix will contain details on the information available within the execution context.

Tab Addresses

This tab is used to enter the list of the recipients of the messages or notifications. A recipient can be defined as a user (their e-mail address is mentioned in the user record) or a BP (concerned contacts are then identified by their functions).

Each line in the grid defines one or several recipients (according to the selected delegates option), and these recipients can receive :

  • a message
  • a notification implying a simple approval request (approval) or a signature
  • both

The group of recipients defined by a grid line is considered to be interdependent from a signature standpoint: only one member of the group needs to sign for the line to be considered signed (since the name of the signer is propagated to the pending signatures for the group).

On the other hand, if there are several lines, the signature of one of the recipients is not propagated to the other lines. Within a signature context, it will then be possible to test the number of groups (lines) who have already signed, in order to trigger an update while taking account of the other signers, if needed.

Tab Message

This tab is used to define the content of the message sent to the concerned recipients. A message is comprised of :

  • an "object" field (expressed as an adonix formula including, if necessary, constants, functions and variables coming from the context). This context is further defined in the technical appendix of the documentation.
  • some main text defined in the corresponding block. Adonix formulas may be integrated by delineating them with vertical bars. The current date, for instance, would be expressed as | date$ |, and the current user code as | GUSER |. It is possible to insert a clob (maximum 5) by writing |CLB/CLOB|, where CLOB is a variable of type clob or expression whose result is a clob.
  • possibly some line text, corresponding to a line sub-detail when the Workflow is of type header/line. The grid of those lines associated with each header is then integrated into the main text where the |LIG| formula has been defined.
  • any links making it possible to trigger signatures by prompting an http server. These links are written by means of formulas of type |SIG/CODE/MESSAGE|, where CODE features the code of the answer which is going to be given.

    For example, it is possible to write :
        |SIG/VAL/"To sign, click on :"|
        |SIG/REJ/"To refuse, click on :"|
    The following would appear in the body of the message:
        To sign, click on link triggering the signature
        To refuse, click on link triggering the refusal
    Obviously these links are variable http links including a necessary context to transmit the necessary information.

In addition to these elements, a certain number of additional fields define the sending conditions along with the information (enclosings) which can be enclosed in the message.

The general setup TYPMES must be equal to Server to allow enclosings to be sent. Otherwise, only the first enclosing is sent (a warning message appears when forcing a message transmission via Client). Moreover enclosings must be accessible from the application server (following a network path if the enclosings are not stored in the database).

The sending of e-mails is dependent on the use of an e-mail system accepting a MAPI interface when sending from the client workstation or SMTP POP3 when the message is sent from the server (this is the case for the majority of e-mail systems available on the market).

The recipients of the Workflow notifications can be directly set up in the rule, either via a user code or via a BP code and a contact type at the BP's. It is also possible to create multi-criteria tables called allocation rules that enable a BP user to specify the recipients on the basis of predefined criteria values.

Tab Approval Request

This tab is used to define Suivi Approval Request type notifications in the planning workbenches of the recipient users and the associated signature conditions, if any. These signature conditions only apply if, in the recipients grid of the corresponding tab, the users are in a request approval mode With signature. With signature.

The message to be displayed in the planning workbench along with the signature deadline when a signature is expected are defined in the form of evaluated expressions.

In addition a grid specifies the answers that the user may give upon signature, and there is also the possibility to directly update a field of the current record in the case of an Object type Workflow. Objet.

It should be noted that the elements evaluated in the answers grid are evaluated upon signature whereas those elements relating to the notification or the associated message are evaluated upon release of the source Workflow. In other words the context is no longer exactly the same. In this way, within an object-type Workflow context, the following elements are available on-line:

  • upon release, all the variables of the screens and tables linked to the object, the additional screens linked to any data model and any allocation rule, and the global variables linked to the signer's context (GUSER is the code of the user who triggered the event).
  • upon signature, the record of the object's main table and the tables described in any data template and allocation rule, but the screens are no longer available on-line, and the global variables are those linked to the signature context (GUSER represents the code of the user who also signs).

A grid named Context is used to transmit values of the triggering context to the signature context. Contexte. Expressions described in this grid are evaluated and transmitted upon signature in the form of a grid of local variables named [L]CTX. These variables can then be used in the setup of the planning workbenches, in the conditions and values linked to the signature, and also in the values and variables linked to the Actions of the next tab, in the case of actions released upon signature.

Tab Action

In a first grid, this tab describes a list of actions which can be released when triggering the event or during the signature phase. Thus either predefined standard actions (a list of these actions is drawn up in the corresponding technical appendix) or specific actions can be called. It should be noted that the concerned action is only called if the execution condition is met.

The grid located below is automatically loaded with the list of the action parameters, in order to enter a list of expressions evaluated in the context and transmitted (either as values, or as pointers; in the latter case, the return values can be used later on).

Specific Buttons

Validation

This button is used to generate and compile the automatic process associated with the Workflow event. This process is coded with the WMK characters followed by the Workflow code. Since validation is performed automatically when recording or modifying a Workflow, this button is only useful to validate an event which would have been copied from one folder to another.