5.2 Adding a Question to the Workflow

NOTE:A question can be specific to one state. As another option, you can define a global question, which you can then associate with any number of states; this is helpful when multiple states require the same question and answer set. Each state can have only one associated question.

For example, consider the following table:

Table 5-1 PTO Request Process

Condition

Causes the work to transition to…

The employee enters a PTO Request.

Submit

The manager indicates receipt.

Review

The manager approves the request.

Approve

The manager denies the request.

Deny

HR has entered the approved vacation

Record

When reviewing the conditions table, look for conditions that can be automated. For example, the third and fourth items are excellent examples of conditions that can be determined automatically by using workflow tools.

For example, you can alter the implementation of the PTO Request workflow, so that the manager’s answer to a workflow question determines if a request is Approved or Denied. Given the design of the PTO Request workflow, the workflow question should appear to the manager in the Review state.

To add a Workflow Question and Responses to the Review State:

NOTE:The Transition out of this state access control determines who can view a Workflow question in a given state (see Section 3.2.3, Setting Access Rights).

  1. From the Teaming Administration portlet on the initial Liferay portal window, click the plus sign (+) to the left of Form and view designers to expand this section and view the available designers. To add the Teaming Administration portlet to the Liferay portal window, See Adding the Teaming Administration Portlet to Your Home Page.

    Teaming Administration portlet
  2. Click Workflow designer.

    Form and view designers
  3. Expand Workflow processes.

    Workflow processes
  4. Click PTO Request.

    Workflow processes
  5. Expand Workflow process and click State - Review.

    PTO Request Workflow process
  6. In the options dialog on the right, click Add.

    State options dialog
  7. Click Workflow question.

    State add options dialog
  8. Type the Question text (Do you approve of this request?) and the Data name (approve_request), then click OK.

    Workflow question options dialog

    The Workflow question process appears below the Review state.

  9. Click Workflow question.

    Review State processes
  10. Click Add.

    State options dialog
  11. Click Workflow response.

    Workflow question add options
  12. Type the Data name (approve_request_yes) and the Response text (Yes), then click OK.

    Workflow response form

    The Workflow response is added below the Workflow question.

  13. Repeat Step 9 through Step 12 to add a “No” response to this Workflow question.