Step 1: Load the Model
If you have not already done so, load the model from Task Sequence Tutorial 1.
Step 2: Add the Utilize Task
- Click on the first Queue to open its properties in the Quick Properties.
- Under the the Flow section, click the Code Edit button to the right of the Use Transport picklist to open the code editor.
- Add a new line after Line 24. On line 25, type the following:
inserttask(ts, TASKTYPE_UTILIZE, item, outobject(current, 1), STATE_UTILIZE);
- Click OK to close the Code Edit window.
If you Run the model now, you will notice that the operator stays at the Processor forever after the item has been unloaded and processed. This is because nothing is freeing the Operator, and the Operator will stay utilized until it is freed by an object. The best place to do this is in the OnProcessFinish of the Processor that is utilizing the Operator.
Step 3: Edit the Processor to Free the Operator
- Connect the Operator to the first Processor with a center port connection.
- Double-click the first Processor to open its Properties window, then click the Triggers tab. In the OnProcessFinish trigger list, select Free Operators. The default trigger parameters will work for this model. The Involved is the first parameter in the TASKTYPE_UTILIZE command we used in the previous step. In order for the Operator to be freed, the involved object must match, in this case, item.
- Click the OK button on the Properties window to close it.
Step 4: Reset and Run the Model
- Reset and Run the model. The Operator should Travel to the Queue, Load the item, Travel to the BasicFR, Delay for 10 seconds, Travel to the Processor, Unload the item, and stay at the Processor for the Process Time.
- Save the model. The next tutorial will build off of what you have done here.