Overview
This document may be useful to troubleshoot workflow issues reported by drivers in the event that the driver is unable to proceed due to multiple started trips assigned to them.
TMW does not allow multiple started trips to be assigned to a single driver at the same time, requiring the previous trip to be completed before the next is started.
When this occurs, the driver will be left unable to perform their workflow on the current expected load without the ability to see the load in their loadlist that is causing the issue.
Common Causes
- JUSTLOOK can re-open a trip in TMW causing the Leg to no longer be in a status of CMP depending on actions taken.
- Dispatch updates, changing the stop information or status of an order in TMW which can also re-open the leg.
- Other updates to an order in TMW that alters the legheader status back to STD without any indication of doing so. Many background processes can cause this and not all have been seen or documented by ASR at this time.
How Do I Know?
- Items listed below are potential indicators, but not all of these will be present nor required for this issue to arise.
- Running the scripting provided under the "Resolving The Issue" section can also help identify if this is occurring.
- Driver does not see their expected load on the load list.
- Driver shows current load as active, but they do not see any workflow actions to progress the workflow of the load.
- Driver was in the middle of their load without workflow issues and now they are unable to progress.
- WORKFLOW-DISABLED does not fall under this category as that is caused by other factors unrelated to a potentially started historical load.
Resolving The Issue
To troubleshoot with the provided scripting, you will need access to the TMW database with permissions to query against the dbo schema.
- Input the driver's id who is reporting workflow issues within the two single quotes. This query will report any legs in a started status that are assigned to the driver. All identifying information to find the problem load are included as well.
SELECT [lgh_number] AS 'LegNumber' ,[ord_hdrnumber] AS 'OrderNumber' ,[lgh_startdate] AS 'LegStartDate' ,[lgh_enddate] AS 'LegEndDate' ,[lgh_outstatus] AS 'LegStatus' ,[lgh_driver1] AS 'Driver' FROM dbo.[legheader] WHERE [lgh_driver1] = '' -- DriverId AND [lgh_outstatus] = 'STD'
The following provided scripting can also be used to look for more information on any reported legs in a started status assigned to the driver and look for open started trips for a driver from asset assignment. You must simply just change the declared driver Id (DRIVERID) to the driver Id you are wanting to query for.
;DECLARE @DriverId VARCHAR(100) = 'DRIVERID' -- Find Other Started Trips. ;SELECT * FROM dbo.LegHeader L WHERE L.[lgh_outstatus] = 'STD' AND ( L.[lgh_driver1] = @DriverId OR L.[lgh_driver2] = @DriverId ) -- Find Open AssetAssignments. ;SELECT * FROM dbo.AssetAssignment A WHERE A.[asgn_type] = 'DRV' AND A.[asgn_id] = @DriverId AND A.[asgn_status] = 'STD'
If multiple records are returned, this is an example of multiple trips started at the same time.
This can be resolved in multiple ways. Either through continued use of the database or directly within TMW.
a.) TMW - Updating the leg in TMW back to completed (CMP) will remove the issue. The load can also be unassigned from the driver in TMW, assigning it back to UNKNOWN or if desired, the load can be removed entirely from TMW in the UI by deleting it. All will rectify the problem with a single driver having multiple started (STD) trips assigned to them.
b.) SQL - As mentioned above, the first option, done programmatically, is to update the Leg back to a completed (CMP) status using the script below. The LegNumber and OrderNumber determined in step one should be used within the single quotes.
c.) SQL - As mentioned in step 2a, the second option, done programmatically, is to un-assign the load from the troubled driver, normally to UNKNOWN. This can however be updated to any driver, but UNKNOWN is usually the safest option to avoid overlap on the newly assigned driver. The LegNumber and OrderNumber determined in step one should be used within the single quotes./* UPDATE THE LEGHEADER BACK TO COMPLETED STATUS */ UPDATE dbo.[legheader] SET [lgh_outstatus] = 'CMP' WHERE [lgh_number] = '' -- LegNumber AND [ord_hdrnumber] = '' -- OrderNumber
Final Notes: Please keep in mind that any updates directly to the database will strictly solve the workflow issue for the driver, which were preventing them from continuing within the Eleos Application./* REMOVE THE DRIVER ASSIGNMENT ON THE LEG */ UPDATE dbo.[legheader] SET [lgh_driver1] = 'UNKNOWN' WHERE [lgh_number] = '' -- LegNumber AND [ord_hdrnumber] = '' -- OrderNumber
The updates performed directly in the database may cause potential side effects within TMW such as asset assignment conflicts or open orders that are not fully closed out properly.
Changes may still be required in TMW directly to fully resolve the issue after the driver is no longer prevented from their work.