This procedure describes how to change one or more attributes of a group of resource links with the same name.
Before you begin
This procedure can also be used to make a change to all resource links with the same source and/or target resources, or any combination of the input parameters used in the QueryCurrentResourceLinks and QueryResourceLinksByTime call methods. Activities can be inserted at both the workflow and subprocess levels.
Procedure
- Add a workflow to change one or more resource link attributes.
- On the activity configuration panel, click Configure Method.
The Configure Method dialog box appears, displaying a list of the available call method service providers.
- Double-click IResourceLinking to display the list of available call methods.
- Click QueryCurrentResourceLinks, and then click Finish.
The input parameters appear in the activity configuration panel.
- In the Resource Link Name field, enter the name of the resource links you want to retrieve.
- Insert a For Each activity, and then configure it as follows:
- In the Collection field, click the arrow, and then select Bind.
The Select Variable dialog box appears.
- Expand the call method you created in step 4, and then select the Return Value output parameter.
This binds the For Each activity to the output of the QueryCurrentResourceLinks call method.
- Click OK.
- Insert a Call Method activity inside the For Each 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.
- Double-click IResourceLinking to display the list of available call methods.
- Click AlterResourceLink, and then click Finish.
- Configure the call method as follows:
- If applicable, in the End Time field, click the first arrow, and then select a new date and time for the resource link to end.
Note: The end time must be later than the start time. If the resource link does not have an end time configured, you can select any date and/or time that occurs after the start time. If a resource link already has an end time configured for it, you can only configure a new end time that is earlier than the configured time.
- In the Resource Link ID field, click the arrow, and then select Bind.
The Select Variable dialog box appears.
- Expand the ForEach activity you configured in step 6, expand the Properties list, and then expand the Current Item list.
- Select the ResourceLinkID property, and then click OK.
- If applicable, in the Resource Link Name field, enter a new name for the resource links returned by the QueryCurrentResourceLinks call method.
- If applicable, in the Start Time field, click the first arrow, and then select a new date and/or time for the resource link to begin.
Note: The new start time can be earlier or later than the start time for the specified resource links as long as the start time has not occurred yet.
- Click Save.
- Run the workflow, or, on the Test/Debug tab, test the workflow to ensure that your input parameters are configured correctly.