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
- In the navigator, click .
- Click Add, and then add and configure a workflow as follows:
- 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.
- Click Edit next to Parameters.
The Edit Parameters dialog box appears.
- 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.
- 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.
- 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.
- Click OK.
- 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.
- 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.
- Double-click the resource actual subprocess, and then insert a Call Method activity.
- On the activity configuration panel, click Configure Method.
The Configure Method dialog box appears, displaying a list of the available call method service providers.
- In the IProductionRuntime methods, click CreateWorkRequest, click Finish, and then configure the input parameters.
- Optional: In the Description field, enter information to uniquely describe the work request.
- In the S95 Id field, bind to the input parameter you configured for the workflow in step 2c.
- In the Work Definition field, click the ellipsis button, and then select the work definition to associate with the work request.
- Insert another Call Method activity, and then click Configure Method.
- In the IProdictionRuntime methods, click CreateWorkResponse, and then click Next.
- In the Item specific configuration area, select a work type from the drop-down list, and then click Finish.
- On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
- Optional: In the Description field, enter information to uniquely describe the work response.
- In the Location field, click the ellipsis button, and then select the equipment location to associate with the work response.
- 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.
- In the Work Request field, click the arrow, and then bind the work response to the work request you created in step 5.
- Insert another Call Method activity, and then click Configure Method.
- In the IProductionRuntime methods, select CreateSegmentResponse, and then click Finish.
- On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
- Optional: In the Description field, enter information to uniquely describe the segment respone.
- Optional: In the End Time field, click the arrow, and then select the terminating date and time for the segment response.
- In the Location field, click the ellipsis button, and then select the equipment location to associate with the segment response.
- 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.
- 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.
- Optional: In the Start Time field, click the arrow, and then select the starting date and time for the segment response.
- In the Work Process Segment field, click the ellipsis button, and then select the work process segment to associate with the segment response.
- Insert another Call Method activity, and then click Configure Method.
- 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
|
---|
- Click Finish.
- Configure the call method as follows:
- On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
- Optional: In the Description field, enter information to uniquely describe the resource actual you want to create.
- 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.
- 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.
- 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.
- In the Quantity field, enter a literal value, or click the drop-down arrow to perform a bind or create an expression.
- 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.
- In the S95 ID field, enter the unique name of the resource actual as you want it to appear on the segment response.
- 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.
- 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.
- In the Unit of Measure field, enter the unit of measure you want to associate with the resource actual.
- Click Save.
- Return to the workflow level, and then double-click the subprocess you added in step 2h, and then configure it as follows:
- On the subprocess configuration panel, click Edit next to Local Variables.
The Edit Local Variables dialog box appears.
- 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.
- Click OK.
- Insert a Call Method activity.
- On the activity configuration panel, click Configure Method.
The Configure Method dialog box appears, displaying a list of the available call method service providers.
- In the IProductionRuntime methods, click QuerySegmentResponses, click Finish, and then configure the input parameters.
- On the activity configuration panel, click Edit, enter a unique name to represent the call method, and then click OK.
- From the Detail Level drop-down list, select FullDetails.
- Insert a For Each activity after the QuerySegmentResponses Call Method activity, and then configure it as follows:
- On the activity configuration panel, click Edit, enter a unique name to represent the activity, and then click OK.
- 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.
- Insert another For Each activity after the first For Each activity, and then configure it as follows:
- On the activity configuration panel, click Edit, enter a unique name to represent the activity, and then click OK.
- 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.
- Insert a Write activity inside the current For Each activity, and then add two writes.
- 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.
- 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.
- Insert an If/Else activity after the Write activity.
- 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".
- 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.
- Click Save.
- Run the workflow, or, on the Test/Debug tab, test the workflow to ensure that your input parameters are configured correctly.
- 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.