You can create multiple context variables in a process flow using the PutContextVarPut-Context-Var action. Once they are created, you can use these context variables in the context of the process context flow activities as and when required.
Steps Follow the steps below to create a Context Variablecontext variable:
- In Web Process Designer, click Repository View icon. The Repository View panel is displayed.
- Click Actions and select the Put-Context-Var action .Drag and drag it to the Canvas area. The Put-Context-Var action is displayed in the Canvas area.
Click Put-Context-Var action and select View Properties from the context pad.
The properties of the Putthe Put-Context-Var action Var action are displayed in the Activity Properties Panel.Click the VARIABLES option tab.
This screen displays a list of existing context variables and the option to Add add the new context variables. The Edit Variable and Delete Variable buttons appear if any context variables have been created or existing context variables have been selected.Info To add a variable, select the name of the activity for which you want to create the context variable , from the drop-down list of Activity Name field.
info
This drop-down lists all the activities that are currently present on the Canvas area. Once you select the activity, all the attributes of the selected activity , are listed in the Variable Name drop-down list. If the Activity Name field is blank, then the current context variables will be listed in the Variable Name drop-down listIf the Activity Name field is left blank, then a new context variable is declared. Select the attribute for which you want to create the context variable , from the drop-down list list of Variable Name field. For example, you can select the File Path field in case of a File Source or File Target activity.
Info .
Enter the value that you want to set for the attribute/context variable , in the Variable Value field.
Click Done.This adds the context variable and takes the control back to the Edit Context Variables screen, where the new context variable is added to the list of existing context variables.Add.
Click Done on the Edit Context Variables screen to add all the displayed context variables to the context of the process flow.Info You can add multiple context variables (up to a maximum of 100) for the process flow. Similarly, you can edit a context variable, by selecting it from the list of existing context variables on the Edit Context Variablesscreen. This selection will enable the Edit Variable button. Clicking this button will display the Context Variable Information screen with the selected context variable details in edit mode. You can make the necessary changes and click Done to save the modified context variable.Info
You can delete a context variable, by selecting it from the list of existing context variables on the Edit Context Variables screen. You can select multiple context variables to delete, by pressing <CTRL> and the context variables. This selection(s) will enable the Delete Variable button. Clicking this button will delete the selected context variable(s).Expand title Settings to View Logs for Standalone/REST(API) triggered Process Flow in Adeptia Connect Dashboard To View the logs in Connect Dashboard of Process Flow either triggered by REST (API) or executed standalone:
- Ensure that 'View Logs on Connect Dashboard' property is enabled.
Set the following required parameters to view its entry in the Connect Dashboard:Context Variable Name Available Key on Parent Context Possible Value transactionType transactionType 500 (App)
501 (File)
502 (EDI)
504 (Custom)templateName templateName templateId templateId spokeCompanyName / partnerName spokeCompanyName / partnerName spokeCompanyId spokeCompanyId PF_ReferenceID PF_ReferenceID transactionExecutionLoggerId parentTxnExecutionLoggerId hubCompanyName hubCompanyName hubCompanyId hubCompanyId direction direction 3200 (Inbound)
3201 (Outbound)
3202 (VAN)Info title Note In case any of the above parameters is not defined in Process Flow Context, and only 'View Logs on Connect Dashboard' property is enabled, the entry in the Connect Database will be blank.
Expand title Settings to to run transaction using REST Webhook in a synchronous mode To run the transaction using REST Webhook in a synchronous mode:
First, set the following predefined context parameters into the process flow.
Variable Name Description Default Value response The response text to be sent as successful response fault The response text to be sent as invalid response statusCode The HTTP status code 202 for successful response 500 for invalid response contentType The content type of response TEXT PLAIN Send the queryParameter async into the request. The possible values for this parameter is true or false.
When parameter value is async=false then the REST listener call will be synchronous with process flow execution, else if the parameter is not specified or is async=true, the call will be asynchronous.
Info If no parameter is set then it is assumed it to be a fault with 500 (Internal Server Error) status codetitle Note Note The list of added put-context-variables is displayed on the bottom of the same window with columns specifying the activity name, variable name, and variable value. You can edit or remove an existing put-context-variable by clicking Edit or Remove button respectively. Click in the canvas area to continue with creating the process flow.