Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 


There was a question in the community as to how we can send out custom messages in the cloud factory and have them as part of the job logs. Below is my attempt to explain how we can do it.

Main Content

Let’s directly get into the technical details. First define a Messages objects containing arrays, each one for Error, Information and Warnings, as below: - Please note: Better to define this in the first step of the scenario execution, so that you can start capturing in the subsequent steps.
rootData.Messages = { Error:[],

Now to collect the messages in the respective arrays, we will use the core class Ctx.Iterator method “push”. It will be used as below.
//capture error
var text = 'This is an error';

//capture information
text = 'This is an information';

Basically, it is used to append an additional element to the array. So, you could keep adding the messages in each of the array as per the scenario need.

Now, on carefully observing the Cloud factory logs, we realize that it is the snapshot of the variable "rootData". And yes, we created our “Messages” object as part of the “rootData”. This way, we will get our “Messages” object in the cloud factory log automatically.

Another way: -

With the above way, you will get the messages at the bottom of the entire log, after all the page related item content is printed. If you are lazy like me to scroll down, then define similar structure in the context of the workflow as the first folder  separately as below: -


Fill the messages in that context as per the above method and you will not be required to scroll ?



Create an additional data variable in "rootData" for messages and that will automatically come up in the logs of cloud factory.
1 Comment
Labels in this area