Create a resource actual

This procedure describes all of the steps required to add and configure resource actuals for a specified segment response.

Before you begin

Depending on the type of actual you are creating, before you proceed with this procedure, make sure you have created the appropriate equipment, material, or personnel resource you are configuring the actual(s) for.

About this task

You can create expressions or bind properties for many of these properties, depending on your workflow requirements.
Attention: The following procedure is provided as an example only and is not meant to be used in a production environment.

Procedure

  1. In the navigator, click Workflow > Workflows.
  2. Click Add, and then add and configure a workflow as follows:
    1. On the workflow configuration panel, in the Personnel field, click the ellipsis button, and then select the personnel resource you want to assign to this workflow.
    2. Click Edit next to Parameters.
      The Edit Parameters dialog box appears.
    3. Click Add, and then configure an input parameter with a Type of String, a Direction of In, and a unique name to bind to the S95 Id of the work request you will create in step 5b.
    4. Click Add, and then configure an output parameter to represent the resource actual's display name, with a Type of String, a Direction of Out, and a unique name to bind to the Write activity you will add in step 20d.
    5. Click Add, and then configure an output parameter to represent the results of the workflow, with a Type of Boolean, a Direction of Out, and a unique name to bind to the Write activity you will add in step 20h.
    6. Click OK.
    7. Add a local subprocess to the workflow, click Edit on the subprocess configuration panel, enter a unique name to represent the resource actual configuration, and then click OK.
    8. Add another local subprocess after the first, click Edit on the subprocess configuration panel, enter a unique name to represent the query you will configure in step 9, and then click OK.
  3. Double-click the resource actual subprocess, and then insert a Call Method activity.
  4. On the activity configuration panel, click Configure Method.
    The Configure Method dialog box appears, displaying a list of the available call method service providers.
  5. In the IProductionRuntime methods, click CreateWorkRequest, click Finish, and then configure the input parameters.
    1. Optional: In the Description field, enter information to uniquely describe the work request.
    2. In the S95 Id field, bind to the input parameter you configured for the workflow in step 2c.
    3. In the Work Definition field, click the ellipsis button, and then select the work definition to associate with the work request.
  6. Insert another Call Method activity, and then click Configure Method.
  7. In the IProdictionRuntime methods, click CreateWorkResponse, and then click Next.
    1. In the Item specific configuration area, select a work type from the drop-down list, and then click Finish.
    2. On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
    3. Optional: In the Description field, enter information to uniquely describe the work response.
    4. In the Location field, click the ellipsis button, and then select the equipment location to associate with the work response.
    5. In the S95 Id field, enter a name for the work response, or click the arrow and create an expression; for example, "<workresponsename>" + ToString(CurrentDateTime()), which will create a unique name for every work response that is created when this workflow is run.
      The value of "<workresponsename>" is the name you choose to give to the work responses.
    6. In the Work Request field, click the arrow, and then bind the work response to the work request you created in step 5.
  8. Insert another Call Method activity, and then click Configure Method.
  9. In the IProductionRuntime methods, select CreateSegmentResponse, and then click Finish.
    1. On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
    2. Optional: In the Description field, enter information to uniquely describe the segment respone.
    3. Optional: In the End Time field, click the arrow, and then select the terminating date and time for the segment response.
    4. In the Location field, click the ellipsis button, and then select the equipment location to associate with the segment response.
    5. In the Parent Id field, click the arrow, and then bind the segment response to the output parameter of the work response you created in step 6.
    6. In the S95 Id field, enter a name for the segment response, or click the arrow and create an expression; for example, "<segmentresponsename>" + ToString(CurrentDateTime()), which will create a unique name for every segment response that is created when this workflow is run.
      The value of "<workresponsename>" is the name you choose to give to the segment responses.
    7. Optional: In the Start Time field, click the arrow, and then select the starting date and time for the segment response.
    8. In the Work Process Segment field, click the ellipsis button, and then select the work process segment to associate with the segment response.
  10. Insert another Call Method activity, and then click Configure Method.
  11. In the IProductionRuntime methods, select the method applicable to the type of actual you are creating, based on your need to set initial start and end time values:
    If you...Then select one of the following
    Need to set initial start and end time values
    • CreateEquipmentActualEx
    • CreateMaterialActualEx
    • CreatePersonnelActualEx
    Do not need to set initial start and end time values
    • CreateEquipmentActual
    • CreateMaterialActual
    • CreatePersonnelActual
  12. Click Finish.
  13. Configure the call method as follows:
    1. On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
    2. Optional: In the Description field, enter information to uniquely describe the resource actual you want to create.
    3. If the call method you are configuring allows you to designate the initial End Time value, click the drop-down arrow to set the date and time.
    4. Depending on the type of resource actual you are creating, in the Equipment, Material, or Personnel field, click the ellipsis button, select the appropriate resource for the actual, and then click OK.
    5. Optional: If you are creating a material resource actual, then, in the Lot or Sublot ID field, enter a literal value, or click the drop-down arrow to perform a bind or create an expression.
      Note: The data type of this field must be GUID.
    6. In the Quantity field, enter a literal value, or click the drop-down arrow to perform a bind or create an expression.
    7. Optional: In the Requirement ID field, enter the resource requirement you want to associate with the actual, or click the drop-down arrow to perform a bind or create an expression.
      Note: The data type of this field must be GUID.
    8. In the S95 ID field, enter the unique name of the resource actual as you want it to appear on the segment response.
    9. If the call method you are configuring allows you to designate the initial Start Time value, click the drop-down arrow to set the date and time.
    10. In the Segment Response ID field, click the drop-down arrow and bind the value to the ReturnValue of the output paramter of the segment response you created in step 9.
    11. In the Unit of Measure field, enter the unit of measure you want to associate with the resource actual.
  14. Click Save.
  15. Return to the workflow level, and then double-click the subprocess you added in step 2h, and then configure it as follows:
    1. On the subprocess configuration panel, click Edit next to Local Variables.
      The Edit Local Variables dialog box appears.
    2. Click Add, and then configure a variable with a Type of String, an Initial Value of **, and a unique name to bind to the Write activity you will create in step 20e.
    3. Click OK.
  16. Insert a Call Method activity.
  17. On the activity configuration panel, click Configure Method.
    The Configure Method dialog box appears, displaying a list of the available call method service providers.
  18. In the IProductionRuntime methods, click QuerySegmentResponses, click Finish, and then configure the input parameters.
    1. On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
    2. From the Detail Level drop-down list, select FullDetails.
  19. Insert a For Each activity after the QuerySegmentResponses Call Method activity, and then configure it as follows:
    1. On the activity configuration panel, click Edit, enter a unique name to represent the activity, and then click OK.
    2. In the Collection field, click the arrow, bind to the return value of the call method you added in step 9, and then click OK.
  20. Insert another For Each activity after the first For Each activity, and then configure it as follows:
    1. On the activity configuration panel, click Edit, enter a unique name to represent the activity, and then click OK.
    2. In the Collection field, click the arrow, bind to the resource actual property of the For Each activity you added in step 19, and then click OK.
      Be sure to select the appropriate property for the type of resource actual you are creating. For example, if you are creating an equipment actual, select the EquipmentActuals property.
    3. Insert a Write activity inside the current For Each activity, and then add two writes.
    4. Bind the first write to the workflow output parameter you configured in step 2d, bind the value of the write to the DisplayName property of the current For Each activity, and then click OK.
    5. Bind the second write to the DisplayName property of the local variable you created in step 15b, bind the value of the write to the DisplayName property of the current For Each activity, and then click OK.
    6. Insert an If/Else activity after the Write activity.
    7. For the left branch of the If/Else activity, click Edit on the activity configuration panel to enter a unique name for the condition, and then click Edit Condition to enter an expression that represents the result the workflow should evaluate to; for example, {Query Segment Responses}.{Equipment Display Name} == "01 - Motherboard Attach".
    8. Insert a Write activity within the left branch of the If/Else activity after the condition, click Edit on the activity configuration activity panel to enter a unique name for the write activity, bind the write to the output parameter you created in step 2e, and then from the Value drop-down list, select True.
  21. Click Save.
  22. Run the workflow, or, on the Test/Debug tab, test the workflow to ensure that your input parameters are configured correctly.
  23. You can view the resource actuals by navigating to the work request you created with this workflow and clicking the Response Information tab in the S95 Model Editor. For more information, see Query segment responses.