Lock Resource Utility (Magic xpi 4.5)
To add the Lock Resource utility to a flow:
-
Drag the Lock Resource utility from the Toolbox pane to your flow.
-
In the Properties pane, enter the information as described in the table below:
|
|
General
|
Step Name
|
Type a name that describes the utility in the flow.
|
Description
|
Type a description of the utility in your flow (optional).
|
Step ID
|
A read-only field displaying the ID of the step in the flow.
|
Component ID
|
An internal identifier number generated automatically.
|
Component Type
|
A read-only field displaying the name of the step type.
|
Condition
|
Enter a condition to specify the flow's execution behavior. You can either click to open the Expression Editor, or you can right-click on the component and select Condition from the context menu.
|
Processing mode
|
Select whether the step should be executed linear, parallel or stand-alone. This is only available if the PSS Subscribe utility is not the first step in the flow.
|
Wait for completion
|
Select whether the step should be run in Wait for Completion mode. The options are Yes or No.
Note:
|
This is available only when the PSS Subscribe utility is a linear step and if it is not the first step in the flow.
|
|
Advanced
|
Save Point
|
Select Yes to indicate that the step is a Save Point in your flow. This is available only if the flow's Recovery Policy is set to Save Point.
|
Call logic flow
|
You can use this option if you want to call generic logic after the execution of a specific step. Once this step has been executed, the flow logic that you defined in the flow properties is called before the Server continues to the following steps.
The options are Yes or No (default).
|
-
Double-click or right-click on the Lock Resource utility and select Configuration from the context menu to open the Lock Configuration dialog box. This dialog box has the following fields:
|
|
Lock Name
|
Enter the name of the Lock utility. Click to use the Expression Editor to enter a name.
|
Always Block
|
Indicates whether multiple locks or single locks should be allowed on the same thread. Select one of the following from the drop-down list:
-
No (default): If a resource is already locked in the same thread, any additional lock will be ignored and will not be blocked.
-
Yes: If a resource is already locked in the same thread, any additional lock on the same resource will wait indefinitely or until the timeout is reached (if a timeout is defined).
Note:
|
In both cases, the lock information is saved in the Space's memory.
|
|
Timeout
|
Enter the maximum time to wait (in seconds) to try and lock the critical section. A zero value indicates that there is no timeout limit.
|
Return Code
|
Click to the right of the field to open the Variables List. From the list, select a variable to receive the return code. This return code indicates whether the locking process has been successful. The return code is:
-
0: Lock is successful.
-
1: Resource is locked by the same FSID.
-
2: Resource is locked by another FSID.
-
3: Error occurred during locking.
-
10: Resource is locked by the same worker.
|
-
Click OK to close the Lock Configuration dialog box. The Lock Resource utility is displayed in the flow.