Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Drag and drop a Section control. Name the section Manager Approval.
  2. Add a text area control with 3 lines and name the control Comments.
  3. Select the section by clicking on its header.
  4. In the properties panel, select the Security Tab.
  5. In the Roles multi-select, select the roles manager and hr. This section will only be visible to the Manager and to the subsequent HR reviewer.
  6. Select Text/Signature Image from the signature dropdown. As before, check the Must Sign checkbox to require a signature and verify that the Lock checkbox is checked to prevent tampering with the signed data .

HR Review Section

Image RemovedImage Added

This section is for the HR reviewer and is similar to the Manager approval section.

  1. Drag and drop text controls for HR name and email. We We've labeled it Name as before the controls Name and Email but the Name property of the control contains HFullName and HEmail. Once again, the form will fill in this control automatically. We'll use the value from this control to create a meaningful audit trail for the workflow.
  2. We've also added an optional Comments field.
  3. As before, in the Security Tab, select the hr role to restrict viewing of this section to HR employees.
  4. Select Text/Signature Image from the Signature dropdown and check the Must Sign checkbox to require a make the signature required.

Business Rules

Open the Flow Designer, edit the Leave Approval Flow, click on the form named Employee, edit the form by clicking on the icon, create a rule to initialize the form and a second one to make the Certification control visible when Sick Leave is selected as the Type of Leave. The Rule Validator can help troubleshoot any issues with rules.

...

Code Block
if (form.load) {
  var an = _data.getParameter ("flow.activity.name");
  if (an === 'Employee' && EId.value.length === 0) {
    // User Information
    EId.value = _data.getParameter('subject.id'); // Username
    EFullName.value = SubjectUtil.getFullName(_data.getParameter ('subject.first.name'), _data.getParameter ('subject.last.name'));
    EEmail.value = _data.getParameter('subject.email');
    MId.value = _data.getParameter('subject.reports.to');
    ManagerApproval.visible = false;
    ManagerApproval.required = false;
  } else if (an === 'ManagerHR' && MFullName.value.length === 0) {
    MFullName.value = SubjectUtil.getFullName(_data.getParameter ('subject.first.name'), _data.getParameter ('subject.last.name'));
    MEmail.value = _data.getParameter('subject.email');
  }
}

...

When you are satisfied with the rules, click the Finish button to save the Rules and then again to save the updates to the flow . and return to the Flow Designer. We're now done with the form.

...

  1. Click the Employee activity and select the employee Employee role.
  2. Click the Manager activity and in the User property type in the string {MId}. Remember that the control in the form for the Manager Id was named {MId}. When the workflow runs,  will resolve the string {MId} to the value of the control from the form and will forward the approval request to the specific manager.
  3. For the HR activity, select the hr HR role.

Set flow properties

  1. Click the toolbar at the top of the flow.
  2. Check the Save PDF box to generate and save a PDF in the repository.
  3. In the Navigation drop down select the type of navigation toolbar you want  to generate.
  4. Set the Visibility to Public in Tenant.
  5. Set the Deployment to Production.

...