You can create advanced workflows using Caspio Bridge DataPages. You can limit available next step options based on the current status of a record. You can also assign records to specific people from the group responsible for the next step. In this example you add a workflow to the Job Posting System ready-made application. This sample workflow will move a job application record through a number of steps/departments towards the final offer.
Setup and preparation
This article assumes that you have already requested and deployed the Job Posting System ready-made application. The Job Posting System (with our without this workflow) requires 5 DataPages. We will be working with three tables through the course of this article:
- Shared_App_Admins – the authentication table (included in the ready-made application)
- Recruiting_Candidates – the job applications table (included in the ready-made application)
- Look-up_Workflow – the workflow design table (created during the article steps)
There is only one DataPage from the ready-made application that we will alter to create this workflow:
- Manage Candidates
The work flow we are going to add will go through the following steps:
Steps to creating a workflow:
Create a workflow look-up table
The first step to create a workflow is to make a table that shows the possible movements of a record. In this example we will create a table called Look-up_Workflow with two fields, Current_Status and Next_Status. These two fields together create a one way street to move a task through the workflow. If you want a record to be moved back and forth between two departments, you will need a separate record in this table for each direction.
Add department or task ownership data to the authentication table for each member
In order to direct tasks to the appropriate team or team member, each individual in the authentication table must have a field to hold their department or task responsibility. In this example, each individual has a task level noted in the Department field of their user-profile record. For example, “New Candidate” indicates that they deal with new candidates, not that they are new candidates themselves.
Add additional monitoring fields to the Recruiting_Candidates table
Because this example is a recruitment process we are going to allow users to see all of the records currently assigned to their task level, regardless of the individual to whom it is assigned. We will add an additional level of security and information by recording the last person who altered an individual record. This way when a new record appears we can see who advanced it.
Navigate to the Tables listing in the Job Posting System app.
Select the Recruiting_Candidates table and click Design.
Add a new field to the table called Last_Edit. Also add a new field called Assigned_To.
Both of these fields should have a Text (255) data type. Click Save to save your changes.
Stamp the incoming records with the first department
In this example we are using the Job Posting System ready-made application. New records are created when a public user fills out a job application using the Candidate Application Web Form. This Web Form is already configured to stamp all new records with “New Candidate” status.
This automatic stamping is accomplished by marking the status field as hidden and entering “New Candidate” as the default value.
Use Record Level Security to Filter the Report DataPage
Now you configure the Report DataPage to follow our workflow. First we will set up record level security so that the current end-user sees only the records that have been assigned to their department.
- Navigate to the DataPages listing in the Job Posting System app. Click Open on Recruiting – Recruiter Apps folder to see the list of DataPages. Select the Manage Candidates DataPage and click Edit.
- Proceed to the Search Type screen. Change the DataPage from a Search Form to use pre-defined criteria by checking Filter data based on your pre-defined criteria.
- Check Restrict record access based on user identity.
To limit the viewable records, you need to identify which field of the source table holds the ownership information that is recorded in the authentication table. In the Recruiting_Candidates table each record has a field called Status. The status data matches the authentication table’s Department field. Select Department and Status from the corresponding dropdown fields. Now when an end-user logs-in they will only see the records with a status matching the department in their user-profile.
Display and Stamp the Last_Edited Field
You will fill the Last_Edit field by stamping each record modification with information from the current user profile.
Still in the DataPage wizard editing Manage Candidates, navigate to the Select Results Page Fields screen.
Select the Last_Edit field we added in step 3.
Move the field to the right-hand panel.
Configure the dropdown that shows the next step
Next, go back to the Select Details Page Fields screen to add the Assigned_to field into the Details page.
In the Configure Details Page Fields screen you configure the Status dropdown. When configured correctly, this dropdown field will only display the current status, and the options available as the next status based on the workflow look-up table.
In the DataPage elements panel select the Status field. Select Dropdow in the Form element.
Choose Look-up table or view as the dropdown’s Source.
Under the Table or view dropdown select the workflow look-up table that we created in step one, which is Lookup_Workflow.
Change the Field for value and the Field for display dropdowns to Next_Status.
Now we are going to limit the number of options based on the department of the current user.
Go to the Security tab.
Click on Limit lookup values based on user identity.
Select Department from the first dropdown.
Select Current_Status from the second dropdown.
Set up the assign to cascading dropdown (optional)
Now that the next step dropdown field has been configured we can make a cascading dropdown that will indicate the team members available in the next step’s department.
Select the Assigned_To field in the DataPage elements panel.
Using the Form Element dropdown field select Cascading Dropdown.
Select Status as the parent field.
Now using the Table or view dropdown select the authentication table (in our example Shared_App_Admins).
Select Department in the Filter by dropdown.
This indicates that the data in the Status field will be compared to the authentication table (department field) to determine which records (employees) will be available as dropdown options.
Choose the fields from the authentication table you would like for display and value. In this example we chose the employee’s first name for both.
Testing and formatting
Now we have added a workflow to this ready-made application. You can test the workflow right inside Caspio Bridge. Open your authentication table and add an employee for each step/department, don’t forget that in this example New Applicant is also a step. Keep the authentication table open for easy reference because you will need to log-in and out a few times to simulate the different end-users.
Fill out a new application using the Candidate Application DataPage in the Recruiting – Public Apps folder. Then go to the Recruiting – Recruiter Apps folder and open the Manage Candidates DataPage. Log-in as an end-user with the New Candidate department. Escalate the Application. Log out using the Logout button in the main Caspio Bridge window toolbar. Log-in again at the next level to make sure that the Application has been escalated correctly. Repeat the process until you are sure that the workflow has been correctly implemented.
Once you are satisfied with the functionality you can take a few minutes to customize the look and feel of your DataPages.