A workflow is used to automate business procedures or or document flows. Items such as documents, information, or tasks are passed from one participant to another in a way that is controlled by certain rules or procedures. A workflow is composed of nodes (steps) which contain actions. Transitions between nodes may contain conditions. Multiple transitions from a node allow parallel processing. This enables complex scenarios to be modeled using the workflow functionality.
In SocrateCloud workflows can be managed using the System Admin -> General Rules -> Workflows menu:
Workflow Owner - used to define the persons responsible for the workflow;
Workflow - a list of all the workflows available in SocrateCloud. This window is used to manage workflows.
Workflow Activities - a history of all the steps, belonging to all workflow instances;
Workflow Process - a history of all workflow instances;
SocrateCloud has a mechanism for monitoring when a new value is inserted or updated in its database. A workflow can be triggered automatically when a condition for a value within a document is met. You can define document value workflows in the Workflow window. The following fields are available:
Name, Description, Comments, Search Key - fields by which you can identify the workflow;
Document Type - a workflow can be triggered in the following ways:
"Document Value" - this type of workflow is automatically started when any entity fulfills a user defined condition. An example may be the approval process for a new customer where credit and pricing approval is required prior to the trading with the new customer;
"Document Process" - this type of workflow controls the processing steps of all document types and is automatically started when processing a document. The processing steps of all document types and is automatically started when processing a document. In SocrateCloud Document Workflows are predefined for all standard document types. The complete list of document workflows is available in the Workflow window, located in the System Admin -> General Rules -> Workflow menu.
"Tutorial" - details in Setup Wizard;
Document Value Logic - condiție for activating a "Document Value";
the condition is verified when saving a record;
there are 2 ways for defining a document value logic:
SQL condition - syntax: "SQL=" + {SQL WHERE condition}
example: SQL=(Updated=Created AND 1=1) where Updated and Created are columns within the selected table
context condition - SocrateCloud specific condition:
format: {expression} [{logic} {expression}]
expression: @{context}@{operand}{value} sau @{context}@{operand}@{context}@ sau {value}{operand}{value}
logic: OR{|} or AND{&}
Obs: do not use OR or AND, but their respective right side symbols;
context: any global or window context;
the window from which the record that starts the workflow is operated;
value: număr or stringt;
the text may or not be included in single quotes;
operand: equal{=}, greater{>}, less{<}, not{!}
exemplu:
@AD_Table_ID@=14 | @Language@!GERGER
@PriceLimit@>10 | @PriceList@>@PriceActual@
@Name@>'J'
Table - contains the columns/fields used to define the SQL condition;
Data Access Level - indicates the access level required for this workflow;
Entity Type, Publication Status, Author, Version - these fields determine ownership and synchronization;
Workflow Owner - select a responsible for workflow execution. The Workflow Owner window allows you to define responsible users, roles, organizations or their respective supervisor;
Priority - indicates the importance of requests generated by the workflow;
Valid From, Valid To - determines the validity period for the workflow;
Start Node - select the first node of the workflow. Details in Nodes;
Workflow Processor, Background workflow processor
Duration Unit - select a unit of measure for duration. Used to define the length of time for the execution;
Duration Limit - maximum (critical) duration for time management purposes (e.g. starting an escalation procedure, etc.) in Duration Units;
Duration, Working Time, Waiting Time, Cost - are used to validate the workflow;
After filling all the necessary fields press Validate Workflow to save the new workflow.
A node represents a step within the document workflow. Nodes/steps can be added depending on the specific flow of documents in the organization. Nodes are defined in the Node tab:
Entity Type - determines ownership and synchronization;
Workflow Owner - determines how the user responsible for the workflow is selected (e.g. for approvals). The available options can be defined in the Workflow Owner window and can be of the following types:
"Human" - the "Human" user is determined by the following rule, depending on the document type:
user corresponding to the sales rep selected on the document (e.g. order);
user corresponding to the employee selected on the document (e.g. requisition);
user who processed the document;
User/Contact - if selected, this user will be responsible;
Invoker Supervisor - if checked, the responsible user will be the supervisor, defined in the User window, for the "Human" user;
"Organization" - the responsible user will be the supervisor, defined in the Organization window, for the organization on the document;
"Role" - any user with this role will be responsible for the workflow;
Notes:
In order to successfully escalate an approval workflow (e.g. after the waiting time expires), we recommend that you define a supervisor for each role, organization and user within the system;
If a workflow uses multiple approval levels based on roles, we recommend that you use a separate role for each level;
Priority - indicates the priority for the requests generated by the node;
Start Mode - indicates how is the execution of an activity triggered:
Automatic - are triggered implicitly by the system;
Manual - explicitly by the User.
Finish Mode - How the system operated at the end of an activity: Automatic or Manual;
Join Element - The semantics for multiple incoming transitions for a Node/Activity:
AND - joins all concurrent transitions;
XOR - requires one transition (no synchronization).
Split Element - the semantics for multiple outgoing transitions for a Node/Activity:
AND - represents multiple concurrent transitions;
XOR - represents the first transition with a true condition.
Action - a workflow node (step) can can be configured to do the following actions:
"Document Action" - you can choose from the list an action that will be applied to the document: "Complete", "Close", "Prepare", etc.
starting with 16.05 the "Invalidate" option is available which will determine the "Invalid" document status.
"Automated Process" - for any process, report, task, workflow, document action;
"Set variables" - for any column, change attribute names and values;
"User choice" - any choice (e.g. approval);
"Wait (sleep)" - can also be used to Start / End / etc.
"Email" - this node will be used to send emails to specific recipients:
Mail Template - HTML mail templates can be used for escalation notifications;
Fixed Address - address entered in the Email field;
Dynamic Address - selecte one of the following Email Recipients:
"Document Business Partner Contacts" - through which email are sent to all business partner contacts with "Email+Notification" selected.
"Business Partner specific internal list" - through which email are sent to all the contacts defined for the document business partner in the WF-Notification List tab and with "Email+Notification" selected.
"Document Business Partner SalesRep" - the business partner representative selected on the document;
"WF Owner" - document representative and document representative supervisor;
v17.11 - A new value called "Approvals" was added, through which an email can be sent to all those who have approved the document (including the applicant) until the level at which the rejection occurs.
"Apps Report" - the SocrateCloud report selected in the Process field will be run when the node is processed;
Parameters tab - is used to defined the report parameters;
the report generated through a document workflow will be available as a PDF attachment in the Notice window;
pressing the Record ID button in the Notice window will open the workflow document;
processing an "Apps Report" node will also generate a record in the Attachments window;
pressing the Record ID button in the Attachments window will open the record in the Notice window, where the report PDF was attached;
Duration, Cost, Working Time, Waiting Time - values used when validating the workflow.
Observations:
Every document type workflow contains four standard nodes that can not be edited: Start, DocPrepare, DocComplete, DocAuto;
Starting with v15.06, the contents of the "Description" field will be displayed on the status bar when viewing the document and respectively, when executing the workflow.
Once a node is created transition rules between nodes must be created. This is done using the Transition tab. The next node must be selected for each respective node (except for DocComplete node) in order to define the desired workflow.
Multiple transitions from one node enable parallel processing, which allows for complex scenarios to be modeled using the workflow functionality. The Sequence field determines the order in which multiple transitions are handled. The way multiple transitions are handled also depends on the Join element and Split Element fields in the Node tab.
Std User Workflow - If selected, only documents with an open status (drafted, in progress, approved, rejected, invalid) are allowed to continue;
Entity Type - determines ownership and synchronization.
Conditions must be respected in order for transitions to take place. They may be set for any transition. Conditions are defined in the Conditions tab by completing the fields described below:
Node transition - respective transition for which the condition is checked
Sequence - defines order in which conditions are checked (if multiple conditions exist)
And/Or - Logical operator for the condition (describes the condition relationship with the previous condition within the sequence)
Column - Condition Variable
Operation - e.g. equal to “=”, greater than “>” etc.
Value - value to which the variable is compared;
Entity Type - determines ownership and synchronization.
A workflow process represents an instance of a document workflow for a specific document. The process starts when a document is created and ends once it reaches it's final node. The Workflow Process window keeps records of all the document workflow instances that were generated. Each record contains information about the source document, the workflow and the process start and end dates.
Workflow activities are all the actions within a workflow process and are determined by the corresponding workflow nodes. The Activity tab displays all the activities for the workflow process.The Workflow Activities (All) window displays all the activities for all the workflow processes.
Using the Manage Process and Manage Activity you can restart or cancel a current node transition within a workflow process. The document corresponding to the workflow process can be viewed using the Record ID button.
The workflow processor is the mechanism responsible with executing "suspended" workflow activities. An activity can enter this state if the corresponding workflow node has one of the following actions defined:
Wait (Sleep)
User Choice
For other action types the workflow will be executed when completing the document.
The workflow processor is only useful when "wait" or "user choice (approval)" action nodes are added to a document workflow.
The frequency set for the workflow processor is determined by smallest unit of measure defined for the document workflow.
For workflow processor, the following parameters can be set:
number of days after which inactivity alerts are sent ("Inactivity Alert Days");
number of days after which a notification email is sent ("Reminder Days".
If one of the parameters is reached, the processor will send an email to the workflow "Supervisor".
Note: an email address must defined in the User window for the indicated user (by default "System").
In order for the system to send any emails, the necessary email server settings need to be made at tenant level.
The workflow processor functionality is detailed below:
1. Starts all the workflow processes that:
are "Started", and
are "Schedule Start Date" = <null> or < current date;
2. Starts all the workflow activities that:
are suspended, and
when "End Wait" > current date, and
the corresponding workflow node has the action: "Wait (sleep)";
3. Updates the priority for workflow activities that
are suspended, and
have amounts are specified in the Dynamic Priority Unit and Dynamic Priority Change fields (for "User Choice" actions)
4. Sends alerts:
Priority alerts - are sent only if the on the workflow processor "Priority Alert" > 0;
Workflow Activity Alerts
are sent only if the activities:
are suspended and
Activity "Priority" amount >= Workflow Processor "Priority Alert" amount;
"Last Alert" = null or date "Last Alert" + "Days Left"(on workflow processor) < current date (only applicable if "Days Left" > 0);
The alert is sent to:
"User/Contact" on the activity, and
"User/Contact" on the workflow processor, and
"Supervisor" on the workflow processor, and
"Workflow Owner" on the activity:
if the responsible is Human, to the user;
if the responsible is Organization. to the document organization supervisor;
if the responsible is Role, to all the users assigned to the role;
The "Workflow Owner" on the workflow process if an alert has already been sent ("Last Alert" exists on the activity) and if not the same as the activity "Workflow Owner". Same user determination rules.
Waiting Time Expiration Alerts
are sent for all workflow activities that:
are suspended, and
"End Wait" > current date;
"Last Alert" = null or date "Last Alert" + "Days Left"(processor) < current date (only applicable if "Days Left" > 0);
the corresponding workflow node action is not "Wait (Sleep)";
The alert is sent to:
"User/Contact" on the activity, and
"User/Contact" on the workflow processor, and
"Supervisor" on the workflow processor, and
"Workflow Owner" on the activity:
if the responsible is Human, to the user;
if the responsible is Organization. to the document organization supervisor;
if the responsible is Role, to all the users assigned to the role;
The "Workflow Owner" on the workflow process if an alert has already been sent ("Last Alert" exists on the activity) and if not the same as the activity "Workflow Owner". Same user determination rules.
Inactivity Alerts - are sent only if the "Inactivity Days" on the workflow processor > 0.
are sent for all workflow activities that:
are suspended
last update date + "Inactivity days" < current date
"Last Alert" = null or date "Last Alert" + "Days Left"(processor) < current date (only applicable if "Days Left" > 0);
The alert is sent to:
"User/Contact" on the activity, and
"User/Contact" on the workflow processor, and
"Supervisor" on the workflow processor, and
"Workflow Owner" on the activity:
if the responsible is Human, to the user;
if the responsible is Organization. to the document organization supervisor;
if the responsible is Role, to all the users assigned to the role;
The "Workflow Owner" on the workflow process if an alert has already been sent ("Last Alert" exists on the activity) and if not the same as the activity "Workflow Owner". Same user determination rules.
5. Verifies Approvals:
all the workflow activities that:
are suspended, and
when "End Wait" > current date, and
the action on the corresponding workflow node is "User Choice";
determines the user on the activity and looks for the escalation supervisor:
direct supervisor, or
supervisor on document organization, or
supervisor on document organization parent (consolidation level)
if no supervisor is found -> Abort
if a supervisor is found, "End Wait" date will be updated: current date + "Waiting time" (from the corresponding node).