JSessionID field can be used to execute the records in a single session.
About this task
Session Management is applicable for runtime operations only. If JSessionID value is null or
expired, the Connector re-generates it implicitly, uses it in the execution of the activity and
returns it in the response. This JSessionID can be used in other activities by providing the same
value in the other activity. If the JSessionID is idle for 5 min it expires and user can provide the
value as null and connector re-generates it.
Procedure
- Right click the Orchestrations section and select new orchestration.
- Drag the newly created ServiceNow endpoint to the orchestration and select any activity.
- Double click the activity added to the orchestration.
- In the Checklist, click Configure.
- Click Browseand use the Project Explorer dialog
box to select the relevant ServiceNow table.
- Click the Map Inputs in the Checklist. The XML
Schemas generated for the selected activity are displayed.
- Create a map between the orchestration variables and the input parameter of the activity.
- To reuse the session, provide valid session information in JSessionID
Field. If the value is not available the connector re-generates it and returns.
Note: Values must be provided at run time for any mandatory elements of the input structure. A value
can be provided by specifying a default value for element or by linking the element with an input
node.
- Select the Map Outputs in the Checklist. The XML
Schema generated to hold the response of the activity is displayed as nodes under the response
output parameter in the From Activity panel.
- Create a map between the output parameters and orchestration variables.
Results
You have configured the ServiceNow activity. If Session ID present in JSessionID is valid
then the same should be displayed in Map Outputs as JSessionID. This value can be stored in a
Variable and can be used in execution of further operations. If the JSessionID field value is
invalid or expired then new session ID gets created which is then implicitly used in the execution
of an activity. This new value is then displayed in Map Outputs as JSessionID.
Note: You can add more than one object as input to this activity. To add more than one object as input,
right click the object in the To Activity pane of Map
Inputs, and select Expand Occurrences. Only multiple objects of
the same type is supported.