This example demonstrates how to monitor a Part that has been in the 'Cued' State for too long.  If that Part is sitting in the 'Cued' State for too long, our example will then Reposition the Part to a new Hold Traveler.

Pre-Requisites

We will assume you already have a Flow and Step Definition that you wish to apply the Event to.  The only special configuration that needs to be done is in the Step Definition.  You should make sure that the 'Track-In' option is checked on the Advanced Tab.  No other special configuration is required to the Flow or Step Definition other than adding the Events to the Step Definition onces it is configured.

Step Track-In

StepTrackIn

 

Creating Actions

Our Event will contain two Actions.  One Action will be responsible for the Reposition to an alternate Flow, in this case it will be a Hold Flow.  The second Action will be responsible for the clearing of scheduled events.  

Repostion Action

Below is the Reposition Action.  We will use this action to Reposition a Part if it has been in the 'Cued' Process State for an extended period of time.  This time period is flexible to your needs.

  • Action Type: Select the Repostion option
  • Flow Definition to Change to: Select the Flow Definition you wish the Part to Reposition to.
  • Step In Flow Definition: Select the Step you wish to begin at within the Flow Definition to Change to.  It is usually the first Step.

RepositionAction

 

Cancel Scheduled Events ACTION

Below is the Cancel Scheduled Events Action.  We will use this action to Cancel any Scheduled Events that are associated with the particular Part Record.  In this case, it will be the two Events.  It is a good Idea to Clear Events from being checked in the system if they are no longer needed.

  • Action Type: Select the Clear Scheduled Events option

CancelScheduledEventsAction

 

Creating Triggers

Our Event will contain two Triggers.  One Trigger will fire once the desired time has elapsed.  The second Trigger will fire when the Part is in the 'In Process' state.

Time Elapsed Trigger

Below is the Time Elapsed Trigger.  This Trigger will Fire the Action to Reposition the Part to our alternate Flow.  The Trigger will be set to Fire after our desired Time has elapsed.  

  • Done String Formula: iif([NOW]>[ECD]+4*<%minutes%>, true, false)

* feel free to adjust the time according to your needs.  It is set for 4 minutes in our example.  See Link for built in conversion for hours, days, etc. syntax.

Variable Type   

Selection Name Variable Name
Pre-Defined -- Current Date --    NOW
Pre-Defined -- Event Created Date --     ECD

Trigger-TimeElapsed

 

 

Cancel if In Process TRIGGER

Below is the Cancel If In ProcessTrigger.  This Trigger is designed to Fire once the Part is in the 'In Process' State.  Since the Part is no longer in the 'Cued' State we can Cancel / Disregard any pending Events that will Reposition the Part for sitting in the 'Cued' State for too long.

  • Done String Formula: iif([STATE]='INPROCESS',true,false)

Variable Type

Selection Name Variable Name
Pre-Defined -- Current Part Process State -- STATE

Trigger-CancelIfInProcessState

 

Creating Events for your Triggers and Actions

Now that you have configured all of your Triggers and Actions it is time to create your Events.  These Events will be attached to the monitored Step Definition later.

Create Step Time Elapsed Event

  • Add the Trigger that handles the 'Step Elapsed Time'.
  • Add the Action that handles the Reposition, 'Step Elapsed Time'.
  • Add the 'Cancel Scheduled Events' Action.  This should be added to occur after the 'Step Elapsed Time' Action.

If you notice, we are also using the 'Cancel Scheduled Events' Action on this Event.  It will also be used on our subsequent Event.  Since both situations will call for the cancelling of the opposite Event, we will just use the same action.

EventStepTimeElapsed

Create a Cancel Event Event

  • Add the Trigger that handles the 'Cancel if In Process'.
  • Add the 'Cancel Scheduled Events' Action

This Event will simply cancel the other scheduled Event since it is no longer needed once the Part leaves the 'Cued' Process State and enters the 'In Process' State.

EventCancelScheduledEvents

 

Adding the Events to the Step Definition

The final phase in this configuration is to add your Events to the Step Definition.  It should be added to the Part for this to work properly.

AddEvents

 

Explanation

 Here is a diagram that explains how the Events are working on the Step Definition.  It is important to realize that when either Event is executed the final Action will cancel out the Non-Executed Event.

 

Summary