Open topic with navigation

TIBCO iProcess® Engine 11.9.1

# SW_SET_PRIORITY

The `SW_SET_PRIORITY` procedure sets the internal message queue priorities. The procedure only changes the priority of the messages that SSOLite sends. It does not change the `SW_CP_VALUE` and `SW_IP_VALUE.` So any subsequent messages for that case will remain at the default level or will be processed in the order of `SW_CP_VALUE` or `SW_IP_VALUE` when using iProcess Workspace (Windows) to process work items.

## Syntax

    SW_SET_PRIORITY (
        message_priority   smallint)

where:

| • | `message_priority` is the priority value.

You can set priorities ranging from `1` to `999`, where `1` is the highest priority, for internal message queues when passing messages between iProcess processes such as from the Background process to WIS processes, or from SSOLite to the Background process. Its default value is `50`. See Prioritizing Messages for more information.

## Notes

Use the SW_UNSET_PRIORITY procedure to restore the default message queue priorities.

## Example

The following example sets the `SW_CASESTART` priority of `Case1` and `Case2` to `70`, `Case3` and `Case4` to `100`, and `Case5` to the default priority.

    CALL swpro.SW_SET_PRIORITY (70)/
    CALL swpro.SW_CASESTART ('CUSTREQ', -1, -1, 'Case1', 'user35', '', ?, ?)/
    CALL swpro.SW_CASESTART ('CUSTREQ', -1, -1, 'Case2', 'user35', '', ?, ?)/
    CALL swpro.SW_SET_PRIORITY (100)/
    CALL swpro.SW_CASESTART ('CUSTREQ', -1, -1, 'Case3', 'user35', '', ?, ?)/
    CALL swpro.SW_CASESTART ('CUSTREQ', -1, -1, 'Case4', 'user35', '', ?, ?)/
    CALL swpro.SW_UNSET_PRIORITY ()/
    CALL swpro.SW_CASESTART ('CUSTREQ', -1, -1, 'Case5', 'user35', '', ?, ?)/

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO iProcess® Engine