xtk.workflow.postEvent in adobe campaign classic

vaidehig2773360

30-08-2018

Hi

I am calling TestBatchfileExt  from TestWorkflow

vars.listName="GOLD FISH";

logInfo("Calling workflow: TestBatchFileExt");

xtk.workflow.PostEvent("TestBatchFileExt", "signal", "", <variables varName= {vars.listName} />, false);

logInfo("Called successfully");

logInfo("ListNameFromSource" + vars.listName);

How can I access vars.listName in estBatchfileExt.

Please post your answer

Accepted Solutions (1)

Accepted Solutions (1)

Vapsy

Employee

30-08-2018

Hi vaidehig27733606,

On the TestBatchFileExt place a JS code activity and read the variable

var myListName = vars.listName;

logInfo("Name passed from calling workflow : " + myListName);

Regards,
Vipul

Answers (11)

Answers (11)

vaidehig2773360

04-12-2018

Hi Vipul

I have one problem with my split activity

The split activity -complement set is not working correct

Capture1.PNGCapture2.PNGCapture3.PNG

Complement set getting the total records,it is not giving complement records,please advice me,What I am doing wrong.

I am looking forward your reply.

Thanks

Vaidehi

vaidehig2773360

08-11-2018

Hi Vipul

I need to open a new thread for my question,but I don't know how to do it,for the time being I am using the same thread

I have 17 million records needs to insert into the table,I couldn't do it in one transaction,how to do it in multiple transactions.

I appreciate your help on this problem.

Thanks

Vaidehi

vaidehig2773360

10-09-2018

Hi Vipul

Test activity which has the following variable from temp table

beforeRefreshCount = 39 (long data type in the table)

and afterRefreshCount = 0(long data type in the table)

39 == 0 returns true,

How should I compare two long values in Test Activity

the condition vars.beforeRefreshCount === vars.afterRefreshCount is returning true always

Why it is not comparing correctly, please give your answer, that would be great help for me.

below is the script to get the values from temp table and passing beforeRefreshCount and afterRefreshCount to Test Activity

var campId=vars.campaignIdentifier;

var beforeRefreshCount;
var afterRefreshCount;
var refreshStatus;

var query = xtk.queryDef.create(
    <queryDef schema="temp:RefreshCounts" operation="select">
      <select>
        <node expr="@id"/>
        <node expr="@campaignIdentifier" />
        <node expr="@fileRecCount" />
        <node expr="@incrementalCount" />
        <node expr="@loadingStatus" />
      </select>
      <where>
           <condition expr= {"@campaignIdentifier= '" + campId + "'"} />
      </where>
      
    </queryDef>);

    var res = query.ExecuteQuery();
   
    for each (var row in res){
   
    logInfo("Id value is  =" + row.@campaignIdentifier);
    beforeRefreshCount= row.@fileRecCount;
    afterRefreshCount=row.@incrementalCount;
    refreshStatus = row.@loadingStatus;
   
    }
   
    logInfo("Before Refreshment" + beforeRefreshCount);
    logInfo("AfterRefreshment" + afterRefreshCount);
   
   
    //vars.beforeRefreshCount = beforeRefreshCount;
    //vars.afterRefreshCount = afterRefreshCount;
   
    logInfo(beforeRefreshCount === afterRefreshCount)

1569106_pastedImage_0.png

Vapsy

Employee

06-09-2018

Hi Vaidehi,

Apologies but I'm not getting the full picture of the requirement here.

Can we start a new thread with clear explanation on the requriement.

Regards,
Vipul

vaidehig2773360

06-09-2018

Hi Vipul

Thanks for your reply

We are planning to store both  the counts before and after enrichment in the table

so in that case campaign workflow activity is going to query the table check the count if both are equal,   one workflow update the before_count, another workflow will update after_count, when it will get updated, we never know.it may take 15 min or 1 or 2 hrs.

in that scenario, which activity will be suitable to query the table continuously until the counts are available and both are equal

will JavaScript code do the job ? can we put the query and checking conditions inside the

while(true){

          Select before_count,after_count from count_table

          where campaignId=campId;

          if(before_count == after_count)

               exit;

}

is that good approach?, Please give your inputs and thoughts

Thanks

Vaidehi

Vapsy

Employee

05-09-2018

Hi Vaidehi,

You can use vars.recCount before enriching to store in an instance variable

then after enrichment you can use a test activiyt and check current vars.recCount = instance.vars.recCount

vaidehig2773360

04-09-2018

Hi Vipul

Thanks for your reply for previous questions.I need another help for the below sceanrio

Here is my sceanrio

Campaign workflow:

Will contain 3 activities

  1. 1. First activity trigger the technical workflow by passing the subscription list name which needs to be refreshed (enriched)
  2. 2. Second activity which needs to keep checking the record count before and after the enrichment

Until both counts are equal, then only we can execute third  activity in the campaign workflow

How to achieve this in campaign workflow, the second activity should keep checking the record count until both are equal

  1. 3. third activity is Approval activity which will send email to the business by saying that enrichment is completed

Technical workflow:

Technical workflow will prepare the records for the enrichment through batch process and then batch process will enrich the records and update the count (take time to update the count table)

Please give your inputs and thoughts,that would be great.

Thanks

Vaidehi

vaidehig2773360

31-08-2018

Hi Vipul

I have another question

When we use External signal to call Technical workflow from campaign workflow ,can we pass variable(parameter) from campaign workflow to technical workflow.

Please give your answer,it would be great help for me.

Thanks