User Custom Event Variables in Adobe Campaign Standard Workflow

We all are very much familiar with variables in Campaign Classic. But in Standard, it is not easy to declare or use variables inside workflow. There are activities like Load File, Transfer File and other which supports the variables like var.filename or other activities supporting var.reccount in the same way as Classic. But using custom variable is not as simple as ACC and here is one of the ways I tried



The first End Activity is calling the Signal activity and while calling, passing the variables and their values as below


Below  Signal activity is configured with the same set of variables as the End Activity above. Also you have the option to mention the data type of the variables (String and Number in this case).

In the Query Activity (which for no reason I choose the Sending Log as dimension), you can add the variables using the syntax $(var/@varName) format as was used in Classic. Also the $Int exists as well. I tried to check different outcomes as you can see in the screenshot which I will explain below

Here is the sample data from the transition coming out of the query activity.


Just to check that the value of the variable persists in the subsequent process boxes, I added the Enrichment next to the Query and added the same variable with different alias and as expected the value persits.

By default the Signal activity will keep on blinking and the workflow also will not stop. to mitigate that, check the "Stop all task in process" checkbox as shown below.


Observations:

  • The $(var/@varName) and $Int(var/@varName), both creates the temp columns as String, even if you configure the Signal activity with parameter data type as Integer.
  • To get Integer column, you have to convert it to Integer like ToInteger($(var/@varName)). Refer to the below SQL for more details
  • The wait activity between the start and end activity is to ensure that the Signal is fully active before the End calls the Signal. In my example, I gave 5 sec wait, but it may work with lower number as well. Without this workflow throws the same error as the one thrown when the workflow is not running.
INSERT INTO wkf5543860_49_1 (sAddress,sDeliveryLogID,sPropertyCode, iPostStayWaitConvertedsPostStayWaitDollarIntsPostStayWait, biId) SELECT  DISTINCT  N0.sAddress, encode(digest(COALESCE(text(N0.biBroadLogId), '') || E'broadLogRcp', 'sha256'), 'hex'), E'ABC', CAST(E'2' AS INTEGER), E'2', E'2', N0.biBroadLogId FROM NmsBroadLogRcp N0 WHERE (encode(digest(COALESCE(text(N0.biBroadLogId), '') || E'broadLogRcp', 'sha256'), 'hex') IS NOT NULL) AND ((N0.biBroadLogId > 0 OR N0.biBroadLogId < 0))





Comments

Popular posts from this blog

Avoid Proxy for HttpClientRequest - IOB-090007 Network error (send(), errno=10054: an existing connection was forcibly closed by the remote host

Adobe Campaign: Call Java Script from Input Form

Call stored procedure from Adobe Campaign Classic