Overview: Simple tasks in workflow DescriptionThe Create Task activity allows the designer to decide if the workflow should wait for the task to complete before transitioning to the next Activity. If the designer selects Wait for Complete, the Workflow inserts the task into the database and waits for an update from that record. When the user changes the state of the task, the Workflow Engine is notified of the update event and the Activity will finish and transition to the next Activity. Completed tasks have a State change when they are in a rollback path. The state of tasks in a rollback path will set to Pending.Tasks that are the destination of a Rollback To Activity will be set to Open.ResolutionGoals Assign tasks to Change RequestsRolling back tasks. Tasks in ServiceNow workflow The ServiceNow Workflow Editor provides three activities to assign and manage tasks using the Create Task activity. The tasks created from within a workflow typically appear inside a related list of the current record. The workflow engine creates the tasks and then waits for a Complete or Incomplete state to transition forward. The interaction between the state change of tasks and the workflow engine is through the update of the current record. The update event will invoke the glide script engine and fire the update event into the workflow. In the Workflow Editor click Open.Locate and select the K14 Change Task Example workflow.Your workflow should look like this:Select Gear Menu > Check OutSelect Gear Menu > PropertiesNotice that this workflow is on the Change Request table. Because our other workflow is also on Change Request a different condition is set. This workflow is configured to run only when the Priority field is set to 3 – Moderate. As we test this time, we will actually have to change the Priority on the Change Request. Close the Workflow Properties window using the X in the upper right-hand corner of the form.Expand the Tasks category in the activities tree.Drag the Create Task activity onto the transition between Log Approval One and Approval Two – Create Task Example.Fill out the form as shown: Name: Create a Change TaskTask Type: Change Task [change_task]Assigned to: K14Task one userShort Description: Task assigned to K14 User OneInstructions: Enjoy your conference!Notice the Wait for Completion checkbox. When checked, this will cause the workflow to wait for the task to be in a state of Complete or Incomplete before transitioning to the next activity. Click SubmitYour screen should look like this:QUESTION: Find the Create Task in the rollback path. What will be the state of the Create Task in the Workflow Context Activity History related list if the Approval Two activity is rejected?Tasks have rolled back states, just like the Approvals did in the previous lab. If a Task is in the path of a rollback, its State is set to Pending. If a task is the target of a Rollback To transition, the task state is set to Open.Return to the main tab of your instance.Go to Change > Create NewSet the Priority: 3 –ModerateRight-click in the form header and select Save.Scroll to the related listsSelect the Approver tabRight-click > K14-Approver One, set the Requested approval to Approve.Select the Change Tasks Related List.Notice how the new task has been added to the Change Request.Right-Click > Close TaskSelect the Approvers related listQUESTION: We are going to reject the Requested approval. What will be the new state of K14-Approval One? Approval Two?Right-Click > Reject the K14-Approver Two Requested approval.Select the Change Tasks related listNote the rolled back state of the Change Task is set to PendingSelect Show Workflow from the related links to view the workflowClose the browser tab of the Workflow Context viewSelect the Approvers related listRight-Click > Approve the K14-Approver One Requested ApprovalSelect the Change Tasks related listRight-Click > Close TaskSelect the Approvers related listRight-Click > Approve the K14-Approver Two Requested ApprovalSelect the Show Workflow related linkThe workflow context is displayed.