Set a lot or sublot for a material requirement

The following procedure is an example of how to create a workflow that specifies a material lot or sublot for a material requirement that is part of a work request.

Before you begin

Before you begin, you must have the appropriate equipment and material resources (including lots and sublots) available. In addition, you must have your production process configured; that is, work process segments, work definition segments, and work definitions must all exist. You can use an existing work request, or you can create a new work request. This procedure includes steps for creating a work request as part of the workflow.

Procedure

  1. Add a workflow that will be used to set a material lot or sublot for a material requirement.
    Note: Activities can be inserted at both the workflow and subprocess levels.
  2. Insert an activity:
    • At the workflow level:
      • From the Standard Activities panel, click and drag the activity you want to insert to a drop point.
        Note: Activities can exist only between the presubprocess and postsubprocess.
    • At the subprocess level:
      • Double-click the local subprocess you want to add the activity to.
      • From the Standard Activities panel, click and drag the activity you want to insert to a drop point.
  3. On the activity configuration panel, click Configure Method.
    The Configure Method dialog box appears, displaying a list of the available call method service providers.
  4. Double-click IProductionRuntime to display the list of available call methods.
  5. Click CreateWorkRequest, and then click Finish.
    The input parameters appear in the activity configuration panel.
  6. Optionally:
    1. In the Description field, enter a description or expression, or bind a property or parameter to the method.
    2. In the S95 ID field, enter a name or expression, or bind a property or parameter to the method.
  7. In the Work Definition field, click the ellipsis button, and then select a work definition.
  8. Click Save.
  9. Insert another Call Method activity after the CreateWorkRequest call method.
  10. On the activity configuration panel, click Configure Method.
    The Configure Method dialog box appears, displaying a list of the available call method service providers.
  11. Double-click IProductionRuntime to display the list of available call methods.
  12. Click ReadSegmentRequirements, and then click Finish.
    The input parameters appear in the activity configuration panel.
  13. Configure the call method as follows:
    1. From the Detail Level list, select IncludeMaterialRequirements.
    2. In the Work Request field, click the arrow, and then select Bind.
      The Select Variable dialog box appears.
    3. Expand the CreateWorkRequest call method you created in step 3, select the ReturnValue parameter, and then click OK.
  14. Insert an Index activity after the ReadSegmentRequirements call method and configure it to read from the collection returned by the ReadSegmentRequirements call method.
  15. Insert a ForEach activity after the Index activity, and then configure it as follows:
    1. In the Collection field, click the arrow, and then select Bind.
      The Select Variable dialog box appears.
    2. Expand the Index activity, select the MaterialRequirements parameter, and then click OK.
  16. Insert a Call Method activity inside the ForEach activity, and then configure it as follows:
    1. On the activity configuration panel, click Configure Method.
      The Configure Method dialog box appears, displaying a list of the available call method service providers.
    2. Double-click IMaterial, click QueryMaterialLots, and then click Next.
      Tip: If you are setting a material sublot, then use the QueryMaterialSublots call method and the following sub-steps.
    3. From the list of criteria, select Material Definition, and then click Finish.
    4. On the activity configuration panel, from the Detail Level list, select OnlyAttributes.
    5. In the Material Definition field, click the ellipsis button, select the material definition that is associated with the material lot or sublot you want to set, and then click OK.
      Note: The material definition you select must be consistent with the material requirement; that is, it must be the same as either the material definition or material class set in the requirement.
  17. Insert an Index activity inside the ForEach activity, below the QueryMaterialLots (or QueryMaterialSublots) call method, and configure it to read from the collection returned by the call method.
  18. Insert a Call Method activity inside the ForEach activity, below the Index activity, and then configure it as follows.
    1. On the activity configuration panel, click Configure Method
    2. Expand IProductionRuntime, click SetMaterialRequirementLotOrSublot, and then click Finish.
    3. On the activity configuration panel, in the Lot or Sublot Id field, click the arrow.
      The Select Variable dialog box appears.
    4. Expand the Index activity you configured in step 14, select the Id parameter, and then click OK.
    5. From the Lot Type list, select MaterialLot or MaterialSublot, depending on whether you are setting a material lot or sublot for the material requirement.
    6. In the Requirement Id field, click the arrow.
      The Select Variable dialog box appears.
    7. Expand the ForEach activity you configured in step 15, select the Id parameter, and then click OK.
  19. Click Save.
  20. Run the workflow, or, on the Test/Debug tab, test the workflow to ensure that your input parameters are configured correctly.

What to do next

Note: If you perform a ReadSegmentRequirements call method on this work request after running this workflow, it will return the lots and/or sublots that you set on the work request's material requirements.