unit 11: workflow - agiloft · 2017. 12. 7. · the workflow state field • when workflow is set...

32
Unit 11: Workflow 1

Upload: others

Post on 28-Jan-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

  • Unit 11: Workflow

    1

  • Questions Covered

    • What is workflow in Agiloft and how do we use the workflow editor?

    • What is the main use for workflow?

    • When do you use workflow rather than a rule?

    • How do we use actions and conditions in a workflow?

    2

  • What is Workflow in Agiloft?• In Agiloft, a workflow is a function that determines the states that a record passes through in its

    lifecycle, and governs which paths are allowed between states. A workflow can include actions that

    run during state transitions.

    The workflow feature may or may not be

    used in a given implementation project.

    Our out-of-the-box solution includes

    workflow, primarily for sending email

    notifications, on the Support Case and

    Helpdesk Case tables.

    • Pictured here is the workflow for the

    Support Case table in your Training Sample

    KB.

    • This graphical representation tells us that

    a support case goes through up to eight

    states in its lifecycle, including Open,

    Assigned, Updated by Customer, and Closed.

    3

  • The Workflow State Field

    • When workflow is set up for a table in Agiloft, it creates a field called Workflow State (wfstate). This field appears on the Fields tab of the Table wizard, just like other types of fields.

    • The Workflow State field, often relabeled as Status, behaves like a drop-down field on the record layout.

    • When editing a record, not all of the status values will appear in the drop-down – that’s because the state field choices depend on which transitionsare allowed in the workflow editor.

    Workflow editor refers to the drag-and-drop interface found on the Workflow tab of any table wizard.

    4

  • The Workflow State Field (continued)

    • The workflow editor is used to define the allowed state values for records in the table, such as In Progress, Assigned, or Completed, as well as the available transitions from one state to another.

    • For example, suppose a support case can move from the Assigned state to Canceled, but not from Completed to Canceled.

    • A transition, represented by an arrow between state boxes in the workflow editor, permits users of the system to move a record from one state to another.

    • Last, workflows can include actions that are executed between particular state values.

    • Example: Run an email action notifying the customer when the support case state changes from In Progress to Completed.

    5

  • Open the Workflow Editor

    • Later in this unit we will add a workflow to our new Tasks table. For

    now, let’s view an existing workflow in the Helpdesk Cases table to see

    how it works.

    • Click Setup Helpdesk Cases in the left pane and navigate to the

    Workflow tab.

    Practice

    6

  • About the Workflow Editor

    • The Workflow State (Status) field appears as a drop-down field on a layout, but the available choices depend on which transitions are allowed in the workflow editor.

    • The next slide shows the workflow editor for the Helpdesk Cases table in your training KB (Setup Helpdesk Cases > Workflow).

    • Carets (arrows) above a state indicate that a record can be created with this value.

    • Carets below a state indicate that a record can be deleted with this value.

    • A circled A indicates that an action is defined for the transition between states.

    • We learned about actions in Units 8 and 10. In workflow, a limited subset of action types are available but they work just the same way as actions in rules or action buttons. The most widely used action type in workflows is an Email action.

    7

  • Workflow Editor Example• Pictured below is the workflow for the Helpdesk Cases table. In your KB, try

    dragging and dropping the states to rearrange them, then press Cancel to close the table wizard without saving.

    8

    Creatable: The caret icon above a state box indicates that records can be created in that state.

    Deletable: The caret icon below a state box indicates that records can be deleted in that state.

    Transition:A transition arrow between states allows the record to move from one status to the next.

    Action: A circled A on a creatable (or deletable) arrow means an action runs when the record is first created (or when the record is deleted).

    Action: A circled A on a transition arrow indicates an action runs during that state change.

  • User Interaction with Workflow• Workflow actions can be displayed on-screen while the record is edited so staff users

    know exactly what actions will occur, and may have the option to override them,

    when making a state change.

    • The transparency for staff users is one benefit of the workflow feature. It displays a

    set of checkboxes in the record form listing the actions that will be triggered by the

    state change.

    • To see this for yourself, edit a Helpdesk Case with a Status of Open. Change the

    Status to Closed and note how the action

    Send Closing email to Customer appears

    on the screen.

    9

  • Let’s Practice with Workflow

    • In the next slides, we will add a workflow to the Tasks table we

    created. We will use this workflow as an alternative to the existing

    Status choice field in our Tasks table.

    • To access the workflow editor, click Setup Tasks in the left pane and

    navigate to the Workflow tab.

    Practice

    10

  • Create a Workflow• Let’s begin by adding the same values we created for the Status choice

    field in our Tasks table.

    From here on, we will refer to the Workflow State field as a Status.

    • In the text box, enter the following values, separated by commas:

    Assigned, In Progress, Done, Canceled, Pending Creator Feedback.

    • Click Add States to add the states to the workflow editor (or press Enter).

    Practice

    11

  • Workflow Transitions• Agiloft automatically adds transition arrows between the statuses you

    just entered.

    • To delete unnecessary transitions, click the transition arrow to select it

    and then click Delete, or press the delete key on your keyboard.

    • Delete all the state transitions now and we will add back just the ones

    we want on the next slide.

    Practice

    12

  • Add Transitions• Now let’s arrange our statuses and add new transitions to the workflow.

    • Start by clicking the edge of the Assigned state box, then drag-and-drop the

    arrow over to the Canceled status to create a transition from Assigned to

    Canceled. Repeat the process to add the rest of the transitions,

    as pictured here.

    • The available transitions are:

    ▪ From Assigned to: In Progress; Canceled;

    Pending Creator Feedback

    ▪ From In Progress to: Canceled; Done;

    Pending Creator Feedback

    ▪ From Pending Creator Feedback to:

    Canceled; In Progress; Done

    ▪ No transitions from Canceled or Done.

    Practice

    13

  • Update Workflow States• If the Assigned status is not identified as the

    Default status, click and highlight the “Assigned”

    status and check the Default checkbox.

    • Workflows must have a default state, and that

    state must also have the ‘Creatable’ option

    selected.

    Double-clicking one of the state boxes opens the

    Edit dialog where you can change the state

    name, make the record Creatable or Deletable in

    that state, and add a Description.

    • Double-click the Done state box and select the

    Creatable checkbox.

    Practice

    14

  • Add Workflow to the Layout

    • Now the diagram looks suitable, but it will not be saved until we press Finish in the Table wizard.

    • Before we save the workflow, let’s add it to the layout.

    • Navigate to the Fields tab of the Tasks table wizard. Let’s rename the Workflow State field to something more meaningful.

    • Edit the Workflow State field and relabel it Alt Status so we can compare it to the existing Status field. Click Finish in the Field wizard.

    Practice

    15

  • Adjust the Layout

    • Go to the Layout tab. Drag the Alt Status field from the available fields onto the Common Area tab, next to the existing Status field in the layout.

    • Click Finish to save your work.

    Adding Alt Status to your current view of the Tasks table will make it easier to identify records in the proceeding exercises. Take a minute to adjust the view now if you wish.

    16

    Practice

  • View Workflow Choices

    • Edit a record in the Task table to see the new Alt Status field. Note that all records will be set with the default state, Assigned.

    • Click the arrow next to Assigned to see the choices that appear in the drop-down:

    • Notice that the Done state does not appear in the drop-down. That’s because the workflow does not allow a transition from Assigned to Done.

    Practice

    17

  • Reorder Workflow Fields

    • Change the status to In Progress and Save the record.

    • When you reopen the record for edit, the Alt Status choices are now Done, Canceled, and Pending Creator Feedback.

    • Now let’s change the order of the workflow choices to something more linear.

    • Select Setup Tasks under the Tasks table drop-down and navigate to the Workflow tab.

    • Click Reorder.

    Practice

    18

  • Reorder Workflow Fields (cont.)

    • In the Reorder dialog, use the arrows to move states up and down into the following order:

    ▪ Assigned

    ▪ In Progress

    ▪ Pending Creator Feedback

    ▪ Canceled

    ▪ Done

    • Press Finish.

    • Press Finish again in the Table wizard to save the changes.

    Practice

    19

  • Search Workflow Fields

    • Besides creating a logical order when viewing records, the order of the workflow state choices affects how searches behave with the Alt Status field.

    • In Unit 5: Searching we learned that searches on choice fields can use the greater than >, less than =, = Pending Creator Feedback finds records where the status is either Assigned, In Progress, or Pending Creator Feedback.

    20

    Greater than Pending

    Less than Pending

  • Add an Email Action

    • Now that we have the initial setup, we can start developing the workflow to automate actions that run during state transitions.

    • For our practice exercise, let’s add an email action when the Status changes to Canceled to notify the user who created the task that it has been canceled.

    • Reopen the Task table Workflow tab to edit the workflow.

    • Double-click the transition between Assigned and Canceled to open the Actions dialog, then choose Create New Action > New Email Action… from the drop-down.

    Practice

    21

  • Add an Email Action (cont.)

    • Using the skills you learned in Unit 8, create an email action called “Email Creator when Task is Canceled” that sends an email to the task’s creator informing them the task was canceled.

    When adding the email action, you can save time by copying and editing a similar email template like the Email task creator that the task is done template.

    • After creating the email action, return to the workflow transition dialog. Find your new action in the Available pane, select it, and click the > button to add it to the Selected pane.

    • Press Finish in the transition dialog to return to the Workflow wizard.

    Practice

    22

  • Finish the Action

    Practice

    • Click Finish one more time to save the state transition and return to the workflow editor.

    • The action should now appear on the transition arrow:

    23

  • Override Workflow Actions• As mentioned previously, workflow actions can appear on-screen and you can give

    users permission to view and optionally override these settings.

    • In the Workflow editor, go to the Override Settings tab, as pictured here.

    • Here, you define which groups can view workflow actions on-screen by checking the box under Visible.

    • Choose which groups can override workflow actions by checking the Optional column.

    ▪ Select Visible and Optional for the Support Manager and Admin groups.

    ▪ Select Visible for the Support Staff group.

    ▪ Add any other groups you want to have these privileges, then press Finish.

    Practice

    24

  • • Let’s see how the new action interacts with our workflow.

    • Open the Tasks table and edit an existing record—the Alt Status will have the default value of Assigned.

    • In the record form, change Alt Status to Canceled to see the workflow email action appear:

    If you add a Description to the action, it will be displayed along with the action name.

    • By deselecting the checkbox next to the action name, staff users can prevent the system from sending the email when the task record is saved.

    • Deselect the checkbox and save the record now. Try changing the status in other records and verify that the system does or does not send an email as appropriate.

    Interacting with Workflow Actions

    Practice

    25

  • • Conditions define a set of criteria that is validated before a workflow action is allowed to occur.

    • In Unit 9 we learned that all rules can be filtered by a saved search criteria, set on the Condition tab of the Rule wizard.

    • Additionally, individual actions within an If-then-Else action are filtered by search conditions that determine whether to run the nested action, like in the image below.

    What are Conditions?

    26

  • • In a workflow, conditions serve the same purpose as they do in rules, acting

    as a decision gate that prevents or allows an action. Be careful, though—the

    logic works just a bit differently.

    • The primary difference between workflow conditions and rule conditions is

    the range of filters available to use:

    • In rules, the full range of saved search filters are available; in workflow, only Simple

    and Script conditions can be used.

    • It’s important to remember how a condition and action interact in

    workflow:

    • If the condition (criteria) is true about a record when the state change occurs, the

    action occurs.

    Using Conditions in your Workflow

    27

  • • Let’s add a condition that checks to see if the task was not canceled by the creator. That way, the system will only send the email if the task is canceled by someone other than the creator.

    • In the workflow editor, begin by double-clicking the transition from Assignedto Canceled.

    • In the Actions screen, click to highlight the email action you just added in the Selected column.

    • From the Set Condition drop-down, select New Simple Guard.

    Add a Condition

    Practice

    28

  • Create Conditions• A pop-up window will open. Enter a name for the condition (e.g., Updater is Not Creator) and

    click Next.

    • Switch to the Condition tab and click the Simple button.

    • Create a condition that finds “Updated By (post) is not equal to Created By (pre)” as in the screenshot below:

    • Remember, the action occurs if the condition is true—in this case, if the updater is not the creator, then send an email.

    29

    Practice

  • • Click Finish to save the condition. The Guard/Condition wizard will close and return to the transition properties screen.

    • With the action still selected, choose the guard you just created, shown here as ‘Updater is Not Creator,’ from the Set Condition drop-down.

    • Click Finish once more to return to the Workflow tab.

    • Click Finish in the table wizard to save your changes.

    Finish Adding a Condition

    Practice

    30

  • • Guards are created just like workflow conditions, but are used a bit differently. While workflow conditions control whether the transition action occurs, a guard prevents the state change itself if the search condition is true. For example, in the Support Cases table we might want to prevent the transition from Open to Closed unless the Solution field is filled out.

    • The logical takeaway is:

    • When a condition is true, the workflow action is allowed to occur.

    • When a guard is true, the workflow transition is prevented.

    • Since guards and conditions operate on the same types of search criteria, you can reuse a condition as a guard and vice versa.

    • In most implementations, Validation actions offer more flexibility than guards to achieve the same result. For this reason, we won’t add guards in this training unit.

    • Our experts use Validation and If-then-else tractions in rules more often than workflow guards, since rules offer more filtering options to handle more complex conditions. For instance, the error presented to users is more customizable in a validation action than a workflow guard.

    • To further your understanding, try adding a guard on your own and comparing it to a validation action.

    A Final Note – What are Guards?

    31

  • • In this unit we learned what workflow is in Agiloft.

    • We learned how to use the workflow editor.

    • We practiced creating a workflow with actions and conditions.

    Workflow Summary

    32