Changes

Jump to: navigation, search

Workflows Overview

2,855 bytes added, 17:30, 23 April 2020
Workflow Condition Examples
=Configuring Configuration – Essentials=
==Create Workflow==
First create and configure the workflow.
* '''Update Company Category''' - use to add or remove selected categories from a company.
* '''Web Service - HTTP Request''' - use to send the HTTP Post web service request via a workflow step to retrieve a web service response.
* '''Web Service- SOAP Message''' - SOAP Message - use to pass information to a system outside of SmartSimple as a Web Services call.* '''Web Service - RESTful Request''' - use to consume Restful web service request via a workflow step to get/post a web service response.
* '''Trigger Workflow''' - use to trigger a different workflow against a specified object.
* '''Signority Submission''' - use to trigger Signority signing process.
||{{no}}
||{{no}}
|-
! scope="row"|[[Workflow Task Type: Web Service - RESTful Request|Web Service - RESTful Request]]
||{{no}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{yes}}
||{{no}}
||{{yes}}
 
|-
! scope="row"|Retrieve Latitude / Longtitude
For Workflows select the desired work flow (all workflows of the Type File will be displayed) and click save.
=Configuring Configuration – Advanced=
==Suppress Workflow Window==
When a workflow step is executed the user is generally presented with a Workflow window where they can select a value that will be used to determine the next task to be performed.
::* '''Activity Amount''': Level 2 field used to store the calculated amount for each record. If 'N/A' is selected, the Level 2s will be created without an amount.
::* '''Activity Index''': Level 2 field used to store the index number of each record. If 'N/A' is selected, the Level 2s will be created without an index number."
 
: If '''Schedule by Number of Activities''' option is selected then following settings are exposed.
::* '''Number of Activities''': Level 1 field used to set the number of activities to be created
::* '''Activity Index''': Level 2 field used to store the index number of each record. If 'N/A' is selected, the Level 2s will be created without an index number."
:* '''Days Delay''' - Number in days of delay before creation of new activity. If left blank, the new activity will be created immediately.::* '''Create for Users in UTA Role''' - select the UTA Role of the users that the Peer Activity should be created against.::* '''Activity Type''' - This is where you specify which Level 2 Type you wish to create. If you select the Custom Field option then a Custom Field ID field is exposed.::* '''Custom Field ID''' - The Create New Activity workflow can be driven by a Custom Field. For example, you could have check boxes at Level 1 corresponding to various Level 2 Types. Selecting each check box would create and attach the relevant Level 2 activity type. You must first create a Custom Field on the Level 1 record which stores the typeid(s) of the Level 2 Types to be created. To create multiple Level 2 records use one of the Select many field types (e.g. Select Many – Check Boxes, Select Many – Scrolling Check Box, Select Many – List Box) and to create a single Level 2 record use the Select One – Combo Box.::* '''Activity Status''' - Allows you to define the Status for the newly created Level 2 record(s). Note: If that Level 2 Status has a workflow attached to it the workflow will be triggered at the point of creation of the Level 2 record.::* '''Reminder Type''' - You can select whether a Quick Message or reminder email will be sent out to the Owner or contacts attached to the record, or any combination of the above.::* '''Reminder Days''' - Sets delay for reminder message being sent.
:
===Task Type: Generate PDF File===
Auto generation of a PDF that can be:
:::::* E-mailed to the person(s) designated in the workflow step.:::::* Stored within a Multiple Files Custom Field.
The PDF generated must be based upon a Web Page View Custom Field. You must specify the Custom Field ID of the Web Page View to be converted in the Web Page Field ID field on the Workflow Task settings.
:
Multiple PDFs can be created and stored in a single Link - Multiple Files custom field using this workflow task type, by entering the Custom Field IDs of the Web Page View fields, separated by commas.
Generate PDF File Tasks have the following settings:
::* '''Name''' - Narrative name for the task.::* '''Task Type''' - manually set to Create Consumer/Provider Link::* '''Task Number''' - A system generated number that determines the presentation order of the task in the workflow. This number can be changed to display the step in a different location.::* '''Description''' - Detailed description of the task (optional).::* '''Expire After''' - Intended duration of the workflow.::* '''Web Page Field ID''' - Must contain the Custom Field ID of the Web Page View to be converted into PDF format. To create multiple PDFs, enter the Custom Field IDs of the Web Page View fields in the Web Page Field ID# setting of the Workflow Task, separated by commas.::* '''Store to Field ID''' - If PDF file should also be stored to the record, must contain the Custom Field ID of the relevant Link - Multiple Files custom field.::* '''PDF Render Language''' - If a language is specified, the language option will be applied to the PDF generated::*::* '''Message Template: Message Type''' - Type of message – e-mail, instant message, both, or none required with this task. E-mail and instant messages can be created using variables that will create custom messages specific to instances of the workflow. Options are No Message Required (default), Quick Message, Email Only and Quick Message and Email.
{{Template:WorkflowMessageTemplate}}
::* '''Routing: Use Variable for Recipients''' - Allows recipients of the message to be selected using variables. See this article for configuration details.
::* '''Routing: Use UTA Role''' - When using roles to select recipients, the UTA Role can be used to determine recipients.
::* '''Routing: Role''' - Used to select recipients by role.
::* '''Routing: Selected Users''' - If required, specific users can be selected to complete this task. This technique restricts the number of users that the initiator can select.
::* '''Routing: Routing Options''' - Specifies the types of options available to process this workflow step. In many instances, the default options can be used, such as Approved, Rejected or Revise. But additional and alternate sets of options can be created to reflect more complex business processes.
:* '''Routing: Use Variable for Recipients''' - Allows recipients of the message to be selected using variables. See this article for configuration details.:* '''Routing: Use UTA Role''' - When using roles to select recipients, the UTA Role can be used to determine recipients.:* '''Routing: Role''' - Used to select recipients by role.:* '''Routing: Selected Users''' - If required, specific users can be selected to complete this task. This technique restricts the number of users that the initiator can select.:* '''Routing: Routing Options''' - Specifies the types of options available to process this workflow step. In many instances, the default options can be used, such as Approved, Rejected or Revise. But additional and alternate sets of options can be created to reflect more complex business processes. 
===Task Type: PDF Merge===
Will convert [[Custom Field Type: Special – MS Word Merge|Word Merge]] document to a PDF which can then be:
:::::* E-mailed to the person(s) designated in the workflow step.:::::* Stored within a Multiple Files Custom Field
:
The PDF generated must be based upon a [[Custom Field Type: Special – MS Word Merge|Word Merge]] Custom Field. You must specify the Custom Field ID of the MS Word Merge document to be converted in the MSWord Merge Field ID field on the Workflow Task settings.
Generate PDF File Tasks have the following settings:
::* '''Name''' - Narrative name for the task.::* '''Task Type''' - manually set to Create Consumer/Provider Link::* '''Task Number''' - A system generated number that determines the presentation order of the task in the workflow. This number can be changed to display the step in a different location.::* '''Description''' - Detailed description of the task (optional).::* '''Expire After''' - Intended duration of the workflow.::* '''MSWord Merge Field ID''' - Must contain the Custom Field ID of the Web Page View to be converted into PDF format. To create multiple PDFs, enter the Custom Field IDs of the Web Page View fields in the Web Page Field ID# setting of the Workflow Task, separated by commas.::* '''Store to Field ID''' - If PDF file should also be stored to the record, must contain the Custom Field ID of the relevant Link - Multiple Files custom field.::* '''PDF Render Language''' - If a language is specified, the language option will be applied to the PDF generated::*::* '''Message Template: Message Type''' - Type of message – e-mail, instant message, both, or none required with this task. E-mail and instant messages can be created using variables that will create custom messages specific to instances of the workflow. Options are No Message Required (default), Quick Message, Email Only and Quick Message and Email.{{Template:WorkflowMessageTemplate}} ::* '''Routing: Use Variable for Recipients''' - Allows recipients of the message to be selected using variables. See this article for configuration details.::* '''Routing: Use UTA Role''' - When using roles to select recipients, the UTA Role can be used to determine recipients.::* '''Routing: Role''' - Used to select recipients by role.::* '''Routing: Selected Users''' - If required, specific users can be selected to complete this task. This technique restricts the number of users that the initiator can select.::* '''Routing: Routing Options''' - Specifies the types of options available to process this workflow step. In many instances, the default options can be used, such as Approved, Rejected or Revise. But additional and alternate sets of options can be created to reflect more complex business processes.
:
===Task Type: People Association===
You can use the People Association Workflow Task Type to automatically add one or more contacts to a Level 1 record. They will be assigned to the record with the UTA role defined in the "Roles will be assigned" setting.
People Association have the following settings:
::* '''Name''' - Narrative name for the task.::* '''Task Type''' - manually set to People Association::* '''Task Number''' - A system generated number that determines the presentation order of the task in the workflow. This number can be changed to display the step in a different location.::* '''Description''' - Detailed description of the task (optional).::* '''Expire After''' - Intended duration of the workflow.::* '''Action''': Add, update or delete the people association::* '''Routing: Use Variable for Recipients''' - Allows recipients of the message to be selected using variables. This is discussed in greater detail in the Configuration – Advanced section.::* '''Routing: Use UTA Role''' - When using roles to select recipients, the UTA Role can be used to determine recipients.::* '''Routing: Role''' - Used to control role of user that will be associated.::* '''Routing: Selected Users''' - If required, specific users can be selected to be associated::* '''Roles will be Assigned''' - select the role(s) that you want the contact(s) to be associated with. To assign different contacts with different roles, you will have to create more than one People Association task.
In the Routing section select a Role currently possessed by the contact(s) you wish to add, whether this is a system role or a UTA role. You can then either select specific contacts or groups that will always be added to the Level 1 when the workflow is triggered, or you can choose Let current user select target user from this role to allow the person that triggers the workflow to select a contact to be added.
Note:
::** If you are allowing the current user to select target user Suppress Workflow Window must be off (not enabled) otherwise the workflow will not fire.::** If you are allowing the current user to select target user, the Workflow must be triggered by a status, and not by a script.::** Include a description, as the description will be presented to the user when they are asked to select the contact to be assigned.
In order to notify the contact(s) that they have been assigned you can create a subsequent Acknowledgement Workflow Task to e-mail all contacts with the UTA role you selected.
@system.xml.''fieldname''.''nodename''.nodevalue@
 
===Task Type: Web Service - RESTful Request===
This workflow task type is used to consume a RESTful web service using GET or POST method.
 
====RESTful Web Service Request using GET Method====
POST method is used to send data to a RESTful web service.
 
[[File:RESTful_GET.PNG|500px]]
 
GET RESTful Web Service Request have the following settings:
 
:* '''Endpoint''' - resource of the web service
:* '''Request Header''' - additional instructions sent with the request. These might define the type of response required or the authorization details.
:* '''Store Response To Field''' - [[Custom_Fields|Custom field]] where the response will be stored.
:* '''Store Response to SmartFolder''' - [[SmartFolders|SmartFolder ID]] where the response file will be stored.
 
====RESTful Web Service Request using POST Method====
POST method is used to send data to a RESTful web service.
 
[[File:RESTful_POST.PNG|500px]]
 
POST RESTful Web Service Request have the following settings:
 
:* '''Endpoint''' - endpoint of the web service
:* '''Request Body''' - data sent with the request.
:* '''Request Header''' - additional instructions sent with the request. These might define the type of response required or the authorization details.
:* '''Store Response To Field''' - [[Custom_Fields|Custom field]] where the response will be stored.
:* '''Store Response to SmartFolder''' - [[SmartFolders|SmartFolder ID]] where the response file will be stored.
 
====Credentials of the RESTful Web Service Request====
<!--89397 - Workflow Task Type: Web Service - RESTful Request -->
Credentials of the web service can be added in the Request Header in the format: Authorization=Basic [base64 encoded credentials].<br/>
A third party software can be used to convert the username/password to a base64 encoded credentials.<br/>
Note that all equal signs within the base64 credentials should be replaced with %3D.<br/>
Example:<br/>
FROM: Authorization=Basic c3NcUyVzZXI6SzhAtHVuY2g<span style="color: #ff0000;">'''='''</span><br/>
TO: Authorization=Basic c3NcUyVzZXI6SzhAtHVuY2g<span style="color: #ff0000;">'''%3D'''</span>
====Parsing JSON response====
<!--67458 - Add GET/POST REST services workflow tasks that are compatible with JSON-->
Variable syntax is available to parse and retrieve values from JSON format data.<br/>
''Sample 1''
<pre>FIELD_NAME: {"firstname":"John"}
variable syntax: @json.FIELD_NAME.firstname@
result: John
</pre>
''Sample 2''
 
<pre>FIELD_NAME: {"primarycontact":{"firstname":"Thomas"}}
variable syntax: @json.FIELD_NAME.primarycontact.firstname@
result: Thomas
</pre>
''Sample 3''
 
<pre>FIELD_NAME: {"users":[{"firstname":"Marie"},{"firstname":"Eve"}]}
variable syntax: @json.FIELD_NAME.users.[# ~firstname~, #]@
result: Marie, Eve
</pre>
===Task Type: Translate Field Value===
3. Confirm your selection by clicking on the Import button at the bottom of the pop-up window.
* *:::::* The workflow tasks will be imported into the new workflow.*:::::* The Edit Workflow page will refresh to show the newly-added workflow tasks.*
==Workflow Condition==
Note: because the sequence in which the system accesses each connector is not configurable it is important that the conditions are mutually exclusive. For example, if you have 3 connectors for different paths based on a particular value the conditions could be:
* *:::::* "@Selection@"="Yes"*:::::* "@Selection@"="No"*:::::* "@Selection@"!="Yes" and "@Selection@"!="No"*:::::* The last statement could also be represented as "@Selection@" not in ("Yes","No")
You can also use MySQL syntax to perform calculations within the Condition:
*:::::* date_format(now(),"%d")="01"*
This condition will be true only on the 1st of the month. This could be used with a Recurring Workflow that loops daily if you wish to send out a summary e-mail on the 1st of every month.
''<u>Example of Incorrect Configuration</u>'':
Three level one [[types]] exist in a given [[UTA|application]], with [[Determining the typeid|typeIDs]] of 12345, 45678 and 67890.
Two connectors are set up on a workflow task with conditions of:
* *::::::* ''"@levelone.typeid@"="12345"'' and*::::::* ''"@levelone.typeid@"="45678"'', respectively*
If the workflow is fired against a record associated with typeID 67890, the workflow will never progress to the next task.
''<u>Example of Correct Configuration</u>'':
As above, three Three level one [[types]] exist in a given [[UTA|application]], with [[Determining the typeid|typeIDs]] of 12345, 45678 and 67890.
Three connectors are set up on a workflow task with conditions of:
* *::::::* ''"@levelone.typeid@"="12345"'',*::::::* ''"@levelone.typeid@"="45678"'' and*::::::* ''"@levelone.typeid@"="67890"'', respectively*
Alternatively, connectors with the following conditions could be set up:
* *::::::* ''"@levelone.typeid@"="12345"''*::::::* ''"@levelone.typeid@"!="12345"'' (not equal to "12345"), and*::::::* ''"@levelone.typeid@" NOT IN ("12345","45678")'', respectively*
'''2. Each condition must be mutually exclusive from every other'''
''<u>Example of Incorrect Configuration</u>'':
Three [[Level_2_Types|level 2 types]] exist in a given [[UTA|application]], with [[Determining the typeid|typeIDs]] of 12345, 45678 and 67890.
Two level 2 [[status]]es exist in the same application, with [[Determining the statusid|statusIDs]] of 888 and 999.
The system administrator wishes to send emails via workflow if the record is in one of the above statuses. One email should be sent out if the type is 12345 or 45678 and a different email should be sent out if a different type has been used.
Two connectors are set up on a workflow task with conditions of:
* *::::::* ''"@level2.typeid@" in ("12345","45678") AND "@level2.statusid@" in ("888","999")'' and*::::::* ''"@level2.statusid@" in ("888","999")''*
The issue here is that both statements [[Boolean Operators|evaluate]] as '''true''' if the statuses on the record triggering the workflow have a statusID of 888 or 999.
Two connectors should be set up on a workflow task with the following conditions:
* *::::::* ''"@level2.typeid@" in ("12345","45678") AND "@level2.statusid@" in ("888","999")'' and*::::::* ''"@level2.typeid@" not in ("12345","45678") AND "@level2.statusid@" in ("888","999")''*
This configuration satisfies Rule #2, in that the conditions are now mutually exclusive. However, a third connector must be included, with the following condition, which connects to the "Complete" task, in order to satisfy Rule #1 above:
* *::::::* ''"@level2.statusid@" not in ("888","999")''*
With these three connectors configured, the workflow will:
* *::::::* never not have instructions on ''whether'' to trigger the next workflow task (Rule #1), and*::::::* always have clear instructions on ''which'' task to trigger given a certain set of conditions (Rule #2).*
==Using iCalendar to generate Meeting Requests, Tasks and Contact cards==
The email engine will process iCalendar objects using the following syntax:
* *:::::* "@@ievent"*:::::* "@@itodo"*:::::* "@@icard"*
Simple sample iCalendar objects are shown below
<!--@end-->
</pre>
 
==Trigger a Workflow from a Custom Browser Script==
'''Level 1''': _triggerwf('@opportunityid@',''workflowid'');
* *:::::: Example:*
_triggerwf('@opportunityid@',98765);
'''Level 2''': _triggerwf('@eventid@',''workflowid'',26);
* *:::::: Example:*
_triggerwf('@eventid@',98765,26);
 
('''26''' is the objecttype for Level 2 activities, and will be the same for all Level 2 workflows)
Notes:
* *:::::* You must not select Let current user select target user from this role for the Routing of workflows triggered by script, as they will not execute.*:::::* Because the workflow is triggered when the script executes it happens before the record is saved. If the workflow changes the Status or a Custom Field value, when the record on the screen is actually saved it will overwrite any changes made by the workflow by those on the page that is being saved. Accordingly you should include any Status or Custom Field changes within the JavaScript that triggers the Workflow.*:::::* If this function is called with a button on a page where standard libraries are not included, make sure to include /js/sstools.js (Example:<script src="js/sstools.js" type="text/javascript"></script>).*
==Using variables with workflows==
'''Task Type: User Activation'''
* *:::::* @password@ - Checks if the user is activated*:::::** if the [[User|user]] is not activated then generates a new random [[Password|password]] (i.e. Your password is: ABCDEFGH)*:::::** if the [[User|user]] is activated then sends the text "current password" (i.e. Password is: current password)
'''Task Type: Acknowledgment'''
*:::::** @randompassword@ - generates a new random [[Password|password]]*:::::** @checkactivatedpassword@ - checks if the [[User|user]] is activated*:::::*** if the [[User|user]] is not activated then generates a new random [[Password|password]]*:::::*** if the [[User|user]] is activated then sends the text "existing password" (see '''Notes''' below)
Because of the complex nature of the password creation and validation process it is not possible to automatically translate '''existing password''' into other languages. If you are sending an e-mail containing the @checkactivatedpassword@ variable you can use the following syntax to display text other than "existing password" if required.
*
The following tabs are also displayed:
* *:::::*** '''Workflows''' – click this tab to see list of workflows.*:::::*** '''Tasks''' – click this tab to see a list of tasks for all workflows.*:::::*** '''Outstanding Tasks''' – click this tab to see a list of outstanding tasks for all workflows.
Each of these tabs has search and sort options, to allow quick and easy location of workflows and tasks.
The steps for '''searching''' are as follows:
*
1. Go to the tab that you wish to search against.
2. Click into the search criteria field to select the list view column to search against.
 
3. Enter in appropriate criteria.
3. Third click returns to the default sort order.
 
 
==Workflow Requests==
The Workflow Requests page lists:
* *:::::*** outstanding tasks that you need to complete based on SmartSimple [[workflows]],*:::::*** tasks that other people need to complete where you are participating in some steps in the workflow, and*:::::*** project tasks that you are assigned to complete.
The request will be listed under the '''Requests to me''' link.
1. Click the '''Communications''', Workflow Requests link. The Workflow task is displayed.
*
2. Click the '''Task type''', '''File''' link. The Workflow step is displayed with the following fields in the request:
* *:::::*** '''Task Name''' – The name of the [[Workflow|workflow]] task.*:::::*** '''Created Date''' – The date the task was triggered.*:::::*** '''Task Description''' – The description of the task’s purpose.*:::::*** '''Action''' – The '''Routing Options''' for the request. These options are only visible for '''Requests For Approval'''.*:::::*** '''Comments''' – This box is always visible but can only be used with '''Request For Comments'''.*:::::*** '''Object Area''' – The bottom portion of the request screen where the attached object is displayed.
3. Select '''Approve''' to approve the file and click the '''Submit''' button. The '''Approve''' option requires us to select a [[User|user]] to send the approval message to so the '''Select User''' list is displayed.
4. Select the [[User|user]] to receive the approval message and click the '''Submit''' button. The step is complete and the Workflow is also complete. The '''workflow complete''' message is displayed.
*
5. Click the '''Communications''', '''Workflow Requests''' button. The [[Workflow|workflow]] is removed from the '''Request to Me''' window.
Some common reasons for workflow messages not arriving are:
* *:::::**# Your [[Browser|browser]] has a pop-up blocker.*:::::**# [[Workflow|Workflows]] are not enabled.*:::::**# There is another [[Workflow|workflow]] triggering on the same status.*:::::**# Your [[Workflow|workflow]] is not configured properly.
Solution to:
*:::::**# Allow [[SmartSimple]] as a trusted site '''''or''''' check your [[Browser|browser]] for any tool bars that may be blocking the pop-ups '''''or''''' set the [[Workflow|workflows]] to [[Workflow - Silent Mode|suppress pop-ups]].*:::::**# Typically in [[UTA]]s, you will need to edit the ''template'' and enable [[Workflow|workflows]] for the level at which they are being triggered.*:::::**# You will need to review the other [[Workflow|workflows]] to make sure that two [[Workflow|workflows]] are not triggering on the same status.*:::::**# You will need to review the configuration of the [[Workflow|workflows]] to ensure that the connectors are set appropriately as well as the individual tasks that are to take place.*
==Determining the Workflow ID==
Once a workflow has been created, the workflow ID (''wfid'') can be found as follows:
* *:::::*** Click on the hyperlink for [[Global Settings]]*:::::*** Go System tab, click on the hyperlink for ''Workflows''*:::::*** The workflow ID is visible as the right-most column on the list of workflows.
Alternatively:
*:::::*** Click on the Edit workflow icon for the Workflow you want, and the Workflow ID will be at the top of the page:*
[[Category:System Management]][[Category:Workflows]][[Category:Applications]]
Smartstaff, administrator
4,478
edits

Navigation menu