This tutorial teaches you how to complete the main flow of a business process.
Learn how to assign a task to a specific user.
Add rules and validations using callback actions.
Don't have the Agile Platform? Download it here!
Tutorial Transcript
This section presents a transcript of the tutorial contents for documentation purposes only. These tutorial instructions appear in Service Studio within the full application context. Download baseline eSpaceStep 1In this tutorial we're going to build up the process flow, restrict user access to tasks, and automate some of the end-user actions using the process.
 - Under Processes, double-click on the
CandidateSelection process to display its flow
Step 2We're going to add a second Human Activity to the process flow. (Take note of these actions for the next step)
- Drag the
Human Activity, drop it onto the connector when it glows, and type ValidateCV for the name - In the Destination property select the
Candidates\Candidate_Show, and then in the CandidateId select the CandidateId - Double-click on Detail and set the expression to:
GetCandidate(CandidateId).Candidate.Name Close the Expression Editor - Double-click on Instructions and set it with the following text:
Validate the candidate's CV. If ok, set the candidate's status to 'Schedule Interviews'. Otherwise, dismiss the candidate. Close the editor - Uncheck all of the Roles except the DepartmentManagers role
Step 3Let's add two more Human Activities to the flow to have a first version of the complete process.
NOTE: Set the Destination and Detail properties with the same values as in ValidateCV
- Add a
ScheduleInterviews, set the Destination and Detail, set the Instructions to: Add an interview with Daniel Mann. Set the candidate's status to 'NeedsApproval'. Uncheck all of the Roles except the AdministrativeAssistants role - Add a
ApproveCandidate, set the Destination and Detail, set the Instructions to: Set the candidate's status to 'Approved' or dismiss the candidate.
Step 4You've completed your first Process flow!
You've used Human Activities and built up the process flow for a candidate selection.
You've also used Roles to grant user group access to each Human Activity. Later on in this tutorial we'll grant access only for a specific user.
Click NEXT to continue. Step 5Let's deploy the application with the changes.
- Click on the
1-Click Publish button. - Wait for the 1-Click Publish to finish...
Step 6- Open the application in the browser by clicking Open in Browser
- Follow the next steps to test your application
Click NEXT to start testing
Step 7- Log in using anne.abbott@mail.com/outsystems
- Create a new candidate: type in a name, set the Position to Software Engineer, and the Status to New.
- Open the candidate's task on the Taskbox
- Edit the candidate and update the status to Validate CV
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 8- Log in using daniel.mann@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Edit the candidate and update the status to Schedule Interviews
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 9- Log in using anne.abbott@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Add a an interview with Daniel Mann
- Edit the candidate and update the status to Needs Approval
- Click Done! on the Taskbox
Click NEXT to continue testing
Step 10- Open the candidate's task on the Taskbox
- Edit the candidate and update the status to Approved
- Click Done! on the Taskbox
- Log out
Click NEXT to continue the tutorial
Step 11We're going to grant access to a manager end-user to see and carry out ApproveCandidate tasks.
- Double-click on the User property and set it to GetManagerForCandidate(CandidateId)
Close the editor
Step 12You've just granted access to an end-user to tasks generated by a Human Activity. By doing this, the user you have set will be the only one to be able to see the task in his Taskbox and carry it out.
You've learned the two ways of granting access to tasks in the Taskbox:
- Set
Roles for role access which normally comprises a group of end-users - Set the User for a specifc end-user access
Click NEXT to continue. Step 13Let's deploy the application with the changes.
- Click on the
1-Click Publish button. - Wait for the 1-Click Publish to finish...
Step 14- Open the application in the browser by clicking Open in Browser
- Follow the next steps to test your application
Click NEXT to start testing
Step 15- Log in using anne.abbott@mail.com/outsystems
- Create a new candidate: type in a name and set the Position to Software Engineer
- Open the candidate's task on the Taskbox
- Edit the candidate and update the status to Validate CV
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 16- Log in using daniel.mann@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Edit the candidate and update the status to Schedule Interviews
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 17- Log in using anne.abbott@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Add an interview with Daniel Mann
- Edit the candidate and update the status to Needs Approval
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 18- Log in using paula.weldon@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Edit the candidate and update the status to Approved
- Click Done! on the Taskbox
- Log out
Click NEXT to continue the tutorial
Step 19In the following steps we're going to add On Close actions that are triggered right before a Human Activity task is ended.
They're going to be designed to automatically update the candidate's status and this way remove the manual step of updating the status: the end-user just has to close the task!
These actions are called Callback Actions.
Click NEXT to continue. Step 20Let's automatically update the candidate's status when a ScreenCandidate is done.
- Right-click on
ScreenCandidate and select the Add On Close option - Drag the
SetCandidateStatus user action and drop it onto the connector when it glows - In the drop list of the
CandidateId argument, select the CandidateId - In the drop list of the
StatusId argument, select the Entities.Status.ValidateCV - Click on
Raise Error, press Delete, click on If, and press Delete again - Click on
ScreenCandidate, double-click on Instructions and update the text to: Check if the name and position are filled. If yes, close the task. Otherwise, dismiss the candidate. Close the editor
Step 21Let's add a second On Close callback action when a ValidateCV is done.
- Right-click on
ValidateCV and select the Add On Close option - Drag the
SetCandidateStatus user action and drop it onto the connector when it glows - In the drop list of the
CandidateId argument, select the CandidateId - In the drop list of the
StatusId argument, select the Entities.Status.ScheduleInterviews - Click on
Raise Error, press Delete, click on If, and press Delete again - Click on
ValidateCV, double-click on Instructions and update the text to: Validate the candidate's CV. If ok, close the task. Otherwise, dismiss the candidate. Close the editor
Step 22Let's add a third On Close callback action when a ScheduleInterviews is done.
- Right-click on
ScheduleInterviews and select the Add On Close option - Drag the
SetCandidateStatus user action and drop it onto the connector when it glows - In the drop list of the
CandidateId argument, select the CandidateId - In the drop list of the
StatusId argument, select the Entities.Status.NeedsApproval - Click on
Raise Error, press Delete, click on If, and press Delete again - Click on
ScheduleInterviews, double-click on Instructions and update the text to: Schedule interviews for the candidate and close the task. Close the editor
Step 23You've just added the On Close callback action to replace the manual step for updating the status.
Use Callback Actions to evolve your processes, introducing rules and validations, or even tie in with the application logic.
Click here to learn more about Callback Actions.
Click NEXT to continue. Step 24Let's deploy the application with the changes.
- Click on the
1-Click Publish button. - Wait for the 1-Click Publish to finish...
Step 25- Open the application in the browser by clicking
Open in Browser - Follow the next steps to test your application
Click NEXT to start testing
Step 26- Log in using anne.abbott@mail.com/outsystems
- Create a new candidate: type in a name and set the Position to Software Engineer
- Open the candidate's task on the Taskbox
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 27- Log in using daniel.mann@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 28- Log in using anne.abbott@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Add a an interview with Daniel Mann
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 29- Log in using paula.weldon@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Edit the candidate and update the status to Approved
- Click Done! on the Taskbox
- Log out
Click NEXT to continue the tutorial
Step 30In the following steps we're going to pass process information to the application.
We're going to use the process information to display (or not) an Approve button and close the ApproveCandidate task for the end-user when he presses the Approve button.
Click NEXT to continue. Step 31We're going to pass the name of the process activity to the application's Web Screens.
- Right-click on
Candidate_Show, select Add Input Parameter, type CurrentStep for the name, and set IsMandatory to No - Click on
ApproveCandidate and set the CurrentStep argument to "ApproveCandidate" - Right-click on
Candidate_Edit, select Add Input Parameter, type CurrentStep for the name, and set IsMandatory to No - Double-click on
Candidate_Show, select the Edit button and set the CurrentStep to CurrentStep
Step 32Now, let's also pass the Identifier of the process activity to the application's Web Screens
- Right-click on
Candidate_Show, select Add Input Parameter, type ActivityId for the name, set the Data Type to Activity Identifier, and set IsMandatory to No - Click on
ApproveCandidate, double-click on ActivityId, and double-click on the ActivityId runtime property Close the editor - Right-click on
Candidate_Edit, select Add Input Parameter, type ActivityId for the name, set the Data Type to Activity Identifier, and set IsMandatory to No - Select the
Edit button and set the ActivityId to ActivityId
Step 33You've just passed the information about the execution status of your process flow to the application's Web Screens through:
- A Text parameter for the name of the executing process activity
- An Activity Identifier parameter for the identifier of the executing process activity
Click NEXT to continue. Step 34Let's add an Approve button to the UI, use the CurrentStep parameter to make it visible only for tasks of the ApproveCandidate human activity.
- Double-click on
Candidate_Edit to open it - Drag a
Button and drop it between the Save and Dismiss buttons - Type "Approve" for the Label and set the Visible property to:
CurrentStep = "ApproveCandidate"
Step 35Now, let's design the Approve flow to update the candidate's status and use the ActivityId to close the ApproveCandidate task in the Taskbox.
- In the Destination property select the
(New Screen Action) option - Double-click on Approve, drag the
SetCandidateStatus user action and drop it onto the connector when it glows - Set CandidateId for the StatusId argument and Entities.Status.Approved for the StatusId argument
- Drag the
CloseApproveCandidate process action, drop it onto the connector when it glows, and set ActivityId for the ActivityId argument - Drag a
Destination, drop it onto the End, element and select Candidate_List
Step 36Let's deploy the application with the changes.
- Click on the
1-Click Publish button. - Wait for the 1-Click Publish to finish...
Step 37- Open the application in the browser by clicking
Open in Browser - Follow the next steps to test your application
Click NEXT to start testing
Step 38- Log in using anne.abbott@mail.com/outsystems
- Create a new candidate: type in a name and set the Position to Software Engineer
- Open the candidate's task on the Taskbox
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 39- Log in using daniel.mann@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 40- Log in using anne.abbott@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Add a an interview with Daniel Mann
- Click Done! on the Taskbox
- Log out
Click NEXT to continue testing
Step 41- Log in using paula.weldon@mail.com/outsystems
- Open the candidate's task on the Taskbox
- Edit the candidate and click on Approve
- Log out
Click NEXT to continue the tutorial
Step 42You have successfully completed this lesson. Now you know how to:
- Build a complete process flow
- Assign a
Human Activity to a specific end-user - Use a
On Close callback action when a process activity is closed - Pass runtime info to the UI about the current process activity, including the Activity Identifier
- Use the
Close<ActivityName> process action to close an ongoing activity
Click FINISH and move on to the next lesson.
|