Link Work Definitions to Job Order Window
The Link Work Definitions to Job Order window is launched when Link is clicked from the work definitions tab for a job order. This window allows you to select work definitions from the list of work definitions that are available to link to a job order. Available work definitions are those that are a root work definition (the top-level work definition for a set of work instructions), that are able to be copied (where isCached is true in the work definition metadata entry), and that are not already linked to a job order. For more information, see Cloning and Caching Work Definitions.
Link Work Definition to Job Order window.
Use the Search field to search for specific work definitions by entering search strings.
Select one or more work definitions from the list, and click Link. When Link is clicked, a copy of each selected work definition is created, including its child work definitions and related entities. This copy is then linked to the job order. This means that multiple copies of a work definition can be linked to a single job order, and ensures that each linked copy is unique.
Mashups and Widgets
The PTC.Factory.Demo.AddLinkedWorkDefinitionToJobOrderMashup mashup defines the Link Work Definitions to Job Order window. This mashup uses the following widgets:
Label widgets for the name of the window and the on-screen help text.
An Infotable Selector widget. When no row is selected in the table, this widget disables the Link button.
A Grid Advanced widget, which lists all of the root work definitions available to be linked to the job order.
Button widgets for the Link and Cancel buttons.
Inputs
The input parameter for the PTC.Factory.Demo.AddLinkedWorkDefinitionToJobOrderMashup mashup is:
jobOrderUID—The UID of the job order that was selected for editing from the Job Orders table.
Outputs
When the Link button is clicked, the UIDs of the selected work definitions are passed to the CreateJobOrderWorkDefinitionLinks service, where they are copied. The copies are then linked to the job order and appear in the list on the Work Definitions.
Services
The mashup uses the following service from the PTC.Factory.Demo.WorkDefinitionUtils Thing:
CreateJobOrderWorkDefinitionLinks—Creates a copy of the selected work definitions, and then creates job-order-to-work-definition link between the job order and each of the copied work definitions.
DisplayLinkableWorkDefinitions—Retrieves the work definitions available to be linked. Work definitions that are not cached, are not root work definitions (are a child work definition or operation), or that are already linked to the job order are filtered out of the results.
Was this helpful?