Handle Container Activity
In this activity real time container, single case dataflow, strategies will be called and results will be
stored in container service page.
Will see everything in detail.
Whatever the real time container request we are setting, we have to deserialize. So for deserializing
we are setting parameters.
[Link]: "{\"SubjectID\":\"Alpha-
10\",\"ContextName\":\"Customer\",\"ContainerName\":\"PNCBank\",\"AppID\":\"BANK\",\"Chann
el\":\"Web\",\"Direction\":\"Inbound\",\"Contexts\":[]}"
So this structure we will deserialize i.e., will convert from json to clipboard structure.
For deserializing the request we are using datatransform.
Here we are setting some parameters for the request.
We are calling another activity for execution of container.
Now we will go to HandleContainerExecution activity
In 1st step we are setting container, channel, direction, subject id and all.
In 2nd step we are calling another activity to perform validations whether the request is correct or
not we are checking that in this activity.
Here if we haven’t find the container then this step will execute. For our case when rule is false , so
step will be skipped.
If we haven’t find the channel then this step will execute.
For our case this step will be skipped.
If service version is greater than 3 it will execute otherwise will jump to 8 th step.
Here we will check the customer id is there or not.
For us customerid is there so this step will not execute and it will jump to 13 th step.
This step will not be execute an it will jump to 15th step.
If we find any errors then this step will execute.
For us we haven’t find any errors so this step will be skipped.
If we haven’t find any errors then the status will be set as “ok”
Now will go back to HandleContainerExecution_V2 activity.
In this activity we will read the cookies and will generate the cookies.
We are calling handlerealtimecontainer activity.
After that we are splitting slot details, creating containerlist page, splitting the list of containers.
For splitting the containers and slots we are using java code.
If we find multiple containers then this step will be execute. For our case we have only single
container so this step will be kipped and it will move to step-8
If we have only one single container in the result this step will be executed.
Just we are setting the container name.
After that we are calling HandleRealTimeContainerExecution activity.
Here setting response status as “ok” and whatever the channel name, containername and direction
is there we are setting it to local variables.
While executing D_Containerconfig, if we not find any container then system will return error as:
For us container is there so this step will not execute.
When we run dpage whatever container name we are getting that name we are setting It to local
variable.
Setting container start date time, end date time.
If current date is after the container window execution this step will be executed, otherwise it will be
[Link] our case this step will not execute.
Here we are checking if container is in active state or not. If container is in active state, this step will
be skipped, otherwise will set the response as:
Setting some browser details and device details.
Calling executeprogramcontainer activity.
We are copying the container request to containerpayload page.
After that creating a page for strategy results.
Here we are setting some parameters which is used for getting the dataflow and by using that
dataflow only whole strategy will be run and we will get response.
We can get the dataflow name by running D_ContainerActive prog datapage.
Here the parameters are container name and appid.
If we give container name and appid we will get dataflow name in pyRulename property.
If we open this dataflow that dataflow is our main dataflow
Coming back to activity
Here we are calling executerealtimeprogram activity, here our single data flow will run and also main
data flow will run.
Setting some properties.
If subject type is prospect this step will be executed, otherwise it will be skipped.
Setting the name of result output class.
Setting some local varaibles.
If service version >=3 this step will be continue. In our case it is jumping to another step.
Creating a new page for offers context.
Creating a new page for decision request context and we are setting context dictionaryid, appid,
subject id to decision request page.
Calling another activity.
Setting temp marketer page.
If operatorid is blank it will jump to 4th step.
For us operator id is blank so it will jump to 4th step.
Here we are creating marketing operator page and setting some values through datatransform for
[Link] page.
After that removing marketoperator page.
Coming back to ExecuteRealTimeProgram activity.
Copying container payload data into decision request page.
If the context is account this step will be skipped, for us it is customer roght, so it will execute.
Creating new page for customerdata.
Here we are executing our singlecustomerdata dataflow.
Will open this activity.
Creating new page for dataflow run.
To run dataflow we are setting some values required.
Our when rule is false . so it will go to 11th step.
In this activity dataflow will run by using java code.
In single customer data flow page copy will happen.
That only we can see in tracer as well.
Coming back to executesinglecase df activity.
If any stepstatus failis there it will go to 12th step, otherwise 13th step.
We are doing page-remove here.
Coming back to executerealtimeprogram activity step 18.
If we have any nonprimaryanonomous use case this step will execute.
For our case this step will be skipped.
Calling another activity for loading the payload to contexts.
Coming back to executerealtimeprogram activity.
Here we are setting dataflowname to rule name parameter to execute main data flow.
Again we are calling executesinglecase df to run the main data flow and here we will get the offers.
If dataflow execution fail it will go to fallback strategy .
If we got any error it will execute fallback dataflow and will show the result as fallback strategy.
So for our case no errors are there so it will jump to step 28.
This step will not execute .
Performing page remove.
Going back to ExecuteProgramForContainer activity step 5.
Setting the container name on response page.
Looping the results whatever we got in the strategy execution and we are assigning that results to
[Link] page.
Setting customer id for every record and transferring the results to publiccomponent page by using
datatransform.
Whatever the properties are there in this datatransform that only we can see in the
servicesimulation results page.
If we find any error, error msg will set.
For us it will be skipped.
If no offers are there this step will execute and will map that result to response page.
Removing unwanted pages.
Going back to HandleRealTimeContainerExecution activity.
If we have any paidmedia this will execute for us step will be skipped.
If we haven’t find any customerid this will execute. for us it will be skipped.
If publiccomponent page list has more than 1 result this step will execute.
Creating new response stream page and setting response type, subject id.
Looping the public component page list and copying the publiccomponent data into response stream
page.
Saving response stream.
Going back to HandleRealTimeContainerExecution_V2 activty step 10
Copying response data to temp page.
After that removing response page.
Copying temp page [Link] property.
Removing unwanted pages.
Going back to HandleContainerExecution_V2 activity last step.
Removing unwanted pages.
Going back to handlecontainerv2 activity.
We got the data into clipboard structure right.
If we want to convert clipboard data into json format we have to do serialization.
If we find any errors this step will execute otherwise it will be skipped.