RefreshAvailableJobsList

Node Action:

This node action refreshes the list of available jobs for the user's current operational map.

Parameters:

se_type

RefreshAvailableJobsList

se_type = RefreshAvailableJobsList

Example:

Complete Current Assignment: This example refreshes both the My Jobs and Available Jobs lists in Session Manager, and completes the current assignment.

digraph workflow {

  entry[
    se_type0 = CompleteAssignmentTrigger,
    se_displayName0 = "Complete Assignment "
    se_iconUrl0 = "https://mysubscription.blob.core.windows.net/img/funnyassignmenticon.png"
    se_requiresConnection0 = false,
    se_sortOrder0 = 100,
    se_visibilityCondition0 = "(ctx, log) => {
      return ctx.Event.assignment.assignedTo == ctx.User.UserId && ctx.Event.isSessionOpen == true;
    }"
  ]
  
  notifyUser[
    se_type0 = NotifyUser,
    se_determineMessage0 = "(dynamicStateMachineContext, msLogger) => {
      return \"Completed Selected Assignment\";
    }",
    se_notificationType0 = "Information",
    se_showToast0 = true
  ]
  
  refreshUI[
    se_type0 = RefreshMyJobsList,
    
    se_type1 = Timer,
    se_delay1 = 200,
    
    se_type2 = RefreshAvailableJobsList,

    se_type3 = Timer,
    se_delay3 = 200,
  ]
  
  exit[
    se_type0 = Action,
    se_action0 = "(ctx, log) => {
      string acceptanceStatus;
      if (AssignmentTypeEquals(\"Approval\") || AssignmentTypeEquals(\"Review\"))
      {
          acceptanceStatus = \"Approved\";
      }
      else
      {
          acceptanceStatus = \"NotApplicable\";
      }
  
      ctx.Output.Cancel = false;
      ctx.Output.WorkflowButtonKey = \"Send\";
      ctx.Output.ShouldCloseSession = true;
      ctx.Output.AcceptanceStatus = acceptanceStatus;
      ctx.Output.WatchForAssignmentType = null;
      ctx.Output.Reason = null;
      ctx.Output.UserId = null;
      
      bool AssignmentTypeEquals(string assignmentType)
        => assignmentType.Equals((string)ctx.Event.assignment.assignmentType, 
            StringComparison.InvariantCultureIgnoreCase);
    }"
    
    se_type1 = CopyToClipboard,
    se_determineData1 = "(ctx, msLogger) => {
      return JsonConvert.SerializeObject(ctx.Output);
    }"
  ]
  
  entry->notifyUser->refreshUI->exit
}
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?