Open topic with navigation

TIBCO iProcess® Engine 11.9.1

# SW_ADD_PACK_DATA

The `SW_ADD_PACK_DATA` procedure defines an item of pack data (a field name/value pair) that will be passed to iProcess with the next command procedure that is called.

## Syntax

    SW_ADD_PACK_DATA (
    field_namevarchar(31),field_valuevarchar(255))

where:

| • | `field_name` is a string that specifies the name of the iProcess field that is to be set.

| • | `field_value` is a string that specifies the value to be set for `field_name`.

Note | Although the value is always passed as a string, it must be in the correct format for the type of field. No validation is performed on either the field name or field value.

## Notes

`SW_ADD_PACK_DATA` allows pack data to be passed to iProcess when a command procedure is called:

| • | You must call `SW_ADD_PACK_DATA` to specify the pack data immediately before calling the desired command procedure.

| • | A call to `SW_ADD_PACK_DATA` defines a single item of pack data. If you want to define multiple items of pack data, you must make a `SW_ADD_PACK_DATA` call for each piece of data before calling the desired command procedure.

| • | The pack data is only valid for the next command procedure that is called.

## Examples

In the following example, two `SW_ADD_PACK_DATA` calls are used to define data values for the `F1` and `F2` fields, which are passed to iProcess when `Case1` is started (using SW_CASESTART). The second `SW_CASESTART` call, starting `Case2`, does not have any data values.

    CALL owner.SW_ADD_PACK_DATA ('F1', 'DataItem1')/
    CALL owner.SW_ADD_PACK_DATA ('F2', 'DataItem2')/
    CALL owner.SW_CASESTART ('CUSTREQ', -1, -1, 'Case1', 'user35', '', ?, ?)/
    CALL owner.SW_CASESTART ('CUSTREQ', -1, -1, 'Case2', 'user35', '', ?, ?)/

If you want to specify pack data for the `F1` and `F2` fields for `Case2` as well, you must call `SW_ADD_PACK_DATA` again before calling `SW_CASESTART`, as shown .

    CALL owner.SW_ADD_PACK_DATA ('F1', 'DataItem1')/
    CALL owner.SW_ADD_PACK_DATA ('F2', 'DataItem2')/
    CALL owner.SW_CASESTART ('CUSTREQ', -1, -1, 'Case1', 'user35', '', ?, ?)/
    CALL owner.SW_ADD_PACK_DATA ('F1', 'DataItem1')/
    CALL owner.SW_ADD_PACK_DATA ('F2', 'DataItem2')/
    CALL owner.SW_CASESTART ('CUSTREQ', -1, -1, 'Case2', '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