3.1 Creating a Workflow

The following procedures show you how to define a workflow, add the states it requires, and define the transitions it requires. The example used is the creation of a Paid Time Off (PTO) request workflow.

3.1.1 Defining a Workflow

  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, click the Add Content link in the upper right corner. This brings up a panel of portlets along the left margin. Expand the Teaming section to add more Novell Teaming features, such as the Teaming Administration portlet.

    Teaming Administration portlet
  2. Click Workflow designer.

    Form and view designers
  3. Click Workflow processes.

  4. In the options dialog on the right, click Add a new workflow process.

  5. In the form that appears on the right, type the Name (workflow name) and Caption (name that appears in Novell Teaming) for this workflow.

  6. Click OK.

    The PTO workflow is now defined in Novell Teaming.

3.1.2 Adding States to a Workflow

  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, click the Add Content link in the upper right corner. This brings up a panel of portlets along the left margin. Expand the Teaming section to add more Novell Teaming features, such as the Teaming Administration portlet.

    Teaming Administration portlet
  2. Click Workflow designer.

    Form and view designers
  3. Expand Workflow processes.

    Workflow processes
  4. Click PTO Request.

    Workflow processes
  5. Click Workflow process.

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

    Options dialog
  7. Click State to add a state to this workflow.

    Workflow add dialog
  8. Type the Caption (name used in Novell Teaming), Data Name (database name), and Description for this workflow as follows:

    The Data Name is an internal-use database name. Names for elements in one definition must be unique. The first character must be an alphabetic character (a-z, A-Z). For the rest, legal characters are alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and underscores (_).

    • Caption: Submit

    • Data Name: Submit_PTO_Request

    • Description: PTO Request Submitted

    State information form
  9. Click OK.

    The new state is added to the workflow and appears in the Workflow Preview area at the bottom part of the window.

    Workflow preview area
  10. Repeat these steps to add the Review, Approve, Deny, and Record states.

    Workflow preview

    NOTE:After the states are defined, the next step is to develop transitions that move an entry from one state to the next. You can also take action when a process enters into or exits from a state. For example, upon entry (or exit) you can send a notification, begin or end a parallel process, or set a variable.

3.1.3 Defining Manual Transitions for a Workflow

The following steps show you how to set up manual transitions (only manual transitions are available without the Advanced Workflow add-on module) between the states in this workflow.

  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, click the Add Content link in the upper right corner. This brings up a panel of portlets along the left margin. Expand the Teaming section to add more Novell Teaming features, such as the Teaming Administration portlet.

    Teaming Administration portlet
  2. Click Workflow designer.

    Form and view designers
  3. Expand Workflow processes.

    Workflow processes
  4. Click PTO Request.

    Workflow processes
  5. Click Workflow process.

    PTO Request workflow
  6. Under Workflow process, expand State - Submit and click Transitions.

    Transitions
  7. In the options dialog on the right, click Add.

    Options dialog
  8. In the options dialog, click Manual Transition.

    Transition Options dialog

    The Manual Transition is the only available transition in Novell Teaming unless you are using the Advanced Workflow add-on module.

  9. In the To state list box, select Review (Review_PTO_Request) and click OK.

    After you successfully complete the previous steps, the preview portion of the page displays an arrow in the flowchart that represents the newly defined transition.

    Transition arrow
  10. Repeat these steps to create the following manual transitions:

    • Review to Approve

    • Review to Deny

    • Approve to Record

    Workflow preview area

    NOTE:You can drag each state to the position you want it to appear in the preview area and click Save layout to save these positions for ease of viewing.

3.1.4 Configuring a Folder to Use This Workflow

You need to configure each folder in which you want to use this new workflow. The following is an example procedure.

  1. In Novell Teaming, go to the PTO Requests folder in Human Resources.

  2. Select the Manage > Configure menu item.

    Manage menu
  3. Under Allowed Workflows, select the PTO Request option.

    Allowed workflows
  4. Click Apply

  5. Click Close.

    User can now use the Workflow > Start workflow: PTO Request menu item when viewing entries in this folder.

3.1.5 Testing the New Workflow

After creating a minimally functional workflow process, you should verify that the transitions function properly. (At this state of its development, the process does not define specific access to the workflow based upon the participant. This means that any user with access rights to the folder that is associated with this workflow can transition the entry through the entire workflow.) This example uses John Waters.

  1. Log in as John Waters (jwaters). See Section 2.2, Initial Logon.

  2. Go to the PTO Requests folder in Human Resources.

  3. Click the New > Discussion entry menu item to add a discussion topic.

    New menu
  4. Type the Title and Description information and click OK.

    The new entry appears in the folder.

    Test folder entry
  5. Click the entry title to view the entry.

    Entry title
  6. Select the Workflow > Start workflow: PTO Request menu item.

    Workflow menu
  7. In the confirmation dialog that appears, click OK to start the PTO Request workflow.

    Confirmation dialog

    The PTO Request workflow is added to entry with the entry in the initial Submit state.

    Entry view
  8. Select Review from the Transition to: drop-down list and click OK.

    Entry view

    The State should change to Review.

  9. Select Deny from the Transition to: drop-down list and click OK.

    The state should change to Deny and there should be no actions available (the Transition to: drop-down list should be gone), because there are no transitions from Deny.

    Entry view
  10. Select the Workflow > Stop workflow: PTO Request menu item to stop the workflow process.

    Workflow menu
  11. Select the Workflow > Start workflow: PTO Request menu item to start the workflow process.

  12. Transition the entry through all the states (except Deny) until you reach Record (no transitions exist from Record).

    The manual transitions allow the user to change the state of this workflow, but in a real business process these transitions should be controlled by specific groups or individuals. The next section, Section 3.2, Setting Access Controls, deals with setting access controls in the workflow.