Section |
---|
Column |
---|
This page is for new to experienced workflow designers who are building a new workflow and looking for a pattern to meet their business requirements. These examples may help you to choose the best design pattern for your situation before you begin building it.
|
|
...
A multi-form approval workflow is a combination of a screenflow, where one user completes multiple separate forms, and an approval workflow. It allows User A to fill out multiple separate forms, and the User B (the approver) to approve each of those separate forms in their own screenflow. Let's say you have a Professional Development Request Workflow. The user needs to submit a form to request professional development approval, and a separate check request form to issue the funds. The manager also needs to approve each of these forms individually.
Image RemovedImage Added
Expand |
---|
title | Click here for steps to create this workflow... |
---|
|
- Start by creating a workflow with four steps. In the Workflow Design Wizard, you will set them up as follows:
Step 1: Professional Development Request - Create New Form - Assignment is None. Step 2: Manager Approval (Professional Development) - Approval Linked Step* - Assign to a User: jerry (or your Manager's UserId). *This links to the parent step Professional Development Request. Step 3: Check Request - Create New Form - Assignment is None. Step 4: Manager Approval (Check Request) - Approval Linked Step^ - Assignment is None. ^This links to the parent step Check Request.
Notice that this initial design is not the final step order that we will use. This is because when you create an Approval Linked Step, it links to the nearest Parent Step above itis created just below it's parent step. So, by designing steps in this order initially we allow frevvo to automatically create approval steps with their corresponding Business Rules and Assignments. In the next stage, we will move these steps around so they are performed in the correct order.
- Click the second step, Manager Approval (Professional Development) and drag it down to the + icon between the third and fourth steps. This places the steps in the correct order in which they will be performed.
Image RemovedImage Added Since Steps 1 and 2 have no assignment, they will be performed by the initial user as a screenflow. The new Step 3 (Manager Approval (Professional Development)) is assigned to the Manager. Step 4 (Manager Approval (Check Request)) has no assignment, so it will also be performed by the Manager as a screenflow. - Edit the form(s) as desired. In this case, we added some fields to the Professional Development form regarding event name, type and cost. We added fields to the Check Request form regarding Payee and Mailing address. The My Items (relabeled My Info in this example) section appears on both forms - it prefills on the first form with the logged in user's details. In the second form, since the controls all have the same name and nesting level, the data entered in Step 1 will be passed into those fields in Step 2. So, on Step 2 (Check Request) we have disabled those fields. We also deleted the Initialization Rule on Step 2, as it is not needed. Both forms have fields. You can also add Manager Approval sections and respective rules to show/hide those sections on the appropriate steps.
Image Removed Image RemovedImage AddedImage Added
- Save and Test the Workflow. Notice that the initial user fills out the Professional Development Request, clicks Continue, and fills out the Check Request in a screenflow. Then, the Manager picks up the task for Manager Approval (Professional Development) and sees the Professional Development form with their approval section. They sign and click continue, and see the Check Request with another approval section in a screenflow. After approving the Check Request they can submit the workflow.
|
...
Users can view the status of an issue using the Task List and its built-in search capabilities. You can search for any workflow tasks that you have performed. The audit trail also shows the progress of the workflow through various approval stages so you can always see where the workflow is currently sitting and the history as it was routed from person to person. Clicking on the View icon also shows the data.
...
Task Collaboration workflow - pass steps between arbitrary users
In some cases, you may want multiple actions taken during a step in the workflow but in an ad-hoc manner. For example, consider a workflow to review a proposal. The first step is the Proposal entry and the second step sends the Proposal for review. However, a number of users may review the proposal in any ad-hoc order.
...
Expand |
---|
- Build the Employee Review Workflow first. This is the workflow that is launched by the Employee Review Launch Form. Follow these steps:
- Create a new flow and name it Employee Review workflow. If you want to know more about creating flows refer to Flow Tutorial.
- Drag and drop 4 text fields from the palette.
- Name them EmployeeID, ManagerID, FirstName, LastName respectively in the properties panel of each text control.
- You can add any additional fields you want but that is optional. Click on the icon. It will bring you to the flow steps.
- Click the first step and click the settings icon on that step.
- It will open the settings wizard.
In the Assignment tab enter {ManagerID} in the Assign to User field. Note |
---|
If assigning the first step to an email address template, you must set encode=false to prevent the "@" symbol from being encoded in your launch rule. The designer should use the template {EmailAddress!encode=false}. |
- Click Submit to save and close the wizard.
- Click on the save icon to exit the flow.
- Copy the Share Dialog Raw Link URL for the Employee Review workflow (the flow you want to launch for each employee) into that field. To do this:
- Go to the Flows tab.
- Click the link under the Employee Review Workflow
- This will open a Share flow wizard . Click on the Raw flow link. Copy the URL in the left textarea. NOTE: any other share URL type will not work.
- Follow these steps to build the Employee Review Launch Form. This form will start multiple new Employee Review workflows.
- You cannot launch a flow sent to the currently logged in user’s task list. You can only send it to another user’s task list. Make sure you are not logged into the other user’s frevvo account when running the Employee Review Launch form. This is being improved in a future release.
- Create a form named Employee Review Launch Form. To know more about creating form refer to Forms Tutorial.
- In the form drag and drop a text control from the palette.
- In the control’s properties on the left, name the control FlowToLaunchURL. You can enter any label you like.
- Uncheck the visible checkbox in the control’s properties to make the control hidden.
- Paste the copied URL in the Employee Review Launch Form FlowToLaunchURL field
- Make the following changes to the URL pasted in the field,
- Cloud customers must change http://app.frevvo.com//443/ to frevvo:// in the URL to the workflow.
- In-house customers must change the http:<domain>:<port> to frevvo:// in the URL to the flow.
- Save the form.
Add an EmployeeID dropdown field. The HR manager will select the employees to be reviewed from this dropdown. You can either add the userId in the Options field in the properties panel of the dropdown control or fetch all the users from the tenant through business rule as below: Code Block |
---|
var event = form.load;
var Users = [];
Users = frevvo.userIds();
EmployeeID.options = Users; |
Add a ManagerID dropdown field. The HR manager selects the manager responsible for reviewing this employee. This is the task list you want the Employee Review form to be sent to. The ManagerIDs can be added through the Options property of the dropdown or fetched from the tenant through Business rules as below: Code Block |
---|
var event = form.load;
var Managers = [];
Managers = frevvo.userIds(“<Your Manager Role>");
Manager.options = Managers; |
Add text controls named FirstName & LastName. The HR manager can enter the employee’s name or they can be fetched through Visual rule builder: Click on the + icon for Create New Rule Navigate to the new rule created and click on theto open the rule window. Click on the Run Builder Button to open the wizard On the first step enter condition EmployeeID in the first dropdown and select Is filled in the second dropdown Click Next, Select FirstName in first Dropdown, ‘to’ in the second dropdown and userFirstName() function in the third. Click Add Action in the right hand top corner. In new added line Select LastName in first Dropdown, ‘to’ in the second dropdown and userLastName() function in the third. Click Next. Add 2 Actions and set the FirstName and LastName to ‘to empty’ in the second dropdown. Click Finish. This rule will automatically populate the FirstName and LastName for the selected EmployeeID.
Add a trigger control named Launch to the form. When the trigger is clicked the form will launch a new Employee Review workflow and put the first step task on the selected Manager’s Task List. Add a Business Rule to call your Employee Review Workflow via the http.get method. The rule shown below runs when the user clicks a Launch trigger button. The rule appends frevvo _data URL parameters to initialize each Employee Review workflow. The rule allows you to trigger the flow for a different user or role when you browse the flow URL.
Code Block |
---|
if (Launch.clicked){
var myurl = FlowToLaunchURL.value;
http.get(myurl + "&_data=(EmployeeID:{EmployeeID},ManagerID:{ManagerUserId},FirstName:{FirstName},LastName:{LastName})");
} |
To test: - Open the Employee Review Launch Form. Select a user from the Employee ID dropdown. The First and Last Name fields are populated with the selected user's information. Select a Manager from the Manager ID dropdown. Click the trigger to run the rule.
- Log out. Log back in with the Manager ID you selected. Verify that an Employee Review workflow task is on the Manager's Task List.
|
In a real case scenario, it is recommended that you:
Create a separate form with all the basic information fields in it. Then add a field where the user filling in that form can add the list of users for whom he wants to start the flow.
Create a Business Rule which uses http.get methodto call your workflow URL. You will have to call this URL multiple times depending on how many users you want to create the task for. You can pass the usernames of those users and basic information data to the flow in this URL by using_data URL parameter.
Note |
---|
If assigning the first step to an email address template, you must set encode=false to prevent the "@" symbol from being encoded in your launch rule. The designer should use the template {EmailAddress!encode=false}. Expand |
---|
title | Expand Rule for assigning steps to emails... |
---|
| To assign the first step to an email address, follow similar steps as above. Instead of a control that collects UserIDs, have a TextArea control in your kickoff form where the user can enter multiple email addresses separated by a comma (in this example, the TextArea control is named UsersProcessed.) Write a rule like this to split the email addresses and send them as _data in the workflow kickoff URL: Code Block |
---|
var count = 0;
var i, url;
var usersProcessed;
if (TriggerFlows.clicked) {
usersProcessed = UsersProcessed.value.split(",");
for (i = 0; i < usersProcessed.length; i++) {
count++;
url = FlowTypeUrl.value + "?_method=post&embed=true&_data=(SubmitterUserId=" + usersProcessed[i] + ")";
http.get(url);
}
SuccessMessage.value = count + " tasks created";
SuccessMessage.visible = true;
} |
The rule to generate tasks will not work unless you are authenticated to frevvo when using that form. frevvo doesn’t allow you to create tasks for other users unless you are logged in. This is a security measure to prevent a a malicious user who has the link to that form from creating spam tasks. |
|
...
In some cases, a workflow needs to go backwards. Non admin users can accomplish this by clicking a configurable Reject button on the form/flow where the user can select the step in the flow to go back to. Tenant and flow administrators use the task list and its built-in modify task feature to reject, reassign or abort tasks. Refer to Using the Task List for information about how these features work.
Submit as Disapproved
In some cases, when any approver disapproves their step, you want the workflow to immediately be discarded. While the only way to truly discard a workflow is the abort the task, we recommend a Submit as Disapproved scenario. See the Submit as Disapproved chapter for an example of this scenario.