Hi All,
I am new to creating custom activities in workflow and seeking help here:
My use case is to create a custom activity that will just enable one of the transitions [either ok or not ok] based on the several conditions- this can be achieved with out of the box activities but I have to do it in a custom activity for final user simplification.
Currently based on the conditions I am able to enable one of the transitions but not able to create the outgoing temporary schema to pass to the next activity. Basically i need help in following, a sample code would be extremely helpful.
1. How to keep the incoming data as it is in the outgoing transition
2. How to filter the incoming data and create a new outgoing transition.
-- While opening the display target and check the output schema it is throwing below error and there is nothing under data tab[display the target > data]
I have searched the community and previously few fellow members have already achieved this but i could not resolve this based on the discussions happened there.
@PLundmark : https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/change-count-of-ou...
@acs-ratul : https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/custom-js-code-for...
@_Manoj_Kumar_ : https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/outbound-transitio...
@Jonathon_wodnicki @DavidKangni
Any related help will also be extremely useful.
Thanks in advance!
Solved! Go to Solution.
Hey @Denis_Bozonnet ,
Thanks a lot for quick response, really appreciate it!
While trying to share the js, I just went through it once and luckily got the error --
Mistake:
I was trying to create a table using - "select * from <previous table> and was trying to post this to outcome postEvent and the previous table name I was trying to fetch from xml body-- which was yielding the incorrect result, once I removed this code and directly used below mentioned code from @DavidKangni response in https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/outbound-transitio...
it worked
task.postEvent(task.transitionByName('transition'));
task.setCompleted();
return 0;
Thanks once again @Denis_Bozonnet @Ssb_94 @DavidKangni for all the help
Hi,
Just to double confirm, have you enabled "Keep the result of interim populations between two executions" under Workflow > Properties
If in case it is already enabled, clear your local cache and try again. Sometimes it might work.
Thanks,
Hi @Ssb_94 ,
Thanks a lot for looking into it and responding!
I tried both the ways [keeping and removing the interim with cache clear and reconnect] but unfortunately , still the same error for me.
I am sure something is wrong in my js- temp table code, but I am wondering why to create a temp table at all, as anyways I just have to get the incoming transition and keep it in the outgoing which can be done with a small code, which I am not aware of and seeking help here.
Views
Replies
Total Likes
it could be the way you get the table name from the incoming transition. It is accessible by var.$xxxxx can’t remember top of my head the variable for the temp table. It’s related to the name of the activity in the workflow. Could you send your JS?
thanks
denis.
Views
Replies
Total Likes
Hey @Denis_Bozonnet ,
Thanks a lot for quick response, really appreciate it!
While trying to share the js, I just went through it once and luckily got the error --
Mistake:
I was trying to create a table using - "select * from <previous table> and was trying to post this to outcome postEvent and the previous table name I was trying to fetch from xml body-- which was yielding the incorrect result, once I removed this code and directly used below mentioned code from @DavidKangni response in https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/outbound-transitio...
it worked
task.postEvent(task.transitionByName('transition'));
task.setCompleted();
return 0;
Thanks once again @Denis_Bozonnet @Ssb_94 @DavidKangni for all the help
restrain yourself to use the Keep interim results as the workflow temp tables will never been cleaned up.
Prior your activity, I would use a Fork activity to share the incoming audience to 2 branches: one where you would save the records in a bespoke data schema, the 2nd branch to do the treatment you want the workflow to do.
hope this helps,
thanks
Denis.
Thank you @Denis_Bozonnet for responding, really grateful!
I am currently doing the same to serve the purpose, but those are extra activities in the workflow which I wanted to remove as the custom activity itself should retain the incoming transition as it is [no change in the numbers or output columns].
Any high level idea to how to keep the incoming transition preserved in the output would also be extremely helpful.
Views
Replies
Total Likes
Views
Likes
Replies