Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Custom JS Code for Custom Workflow Activity Execution (ACC)

Avatar

Avatar
Validate 1
Level 1
acs-ratul
Level 1

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
acs-ratul
Level 1

Likes

0 likes

Total Posts

18 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
acs-ratul
Level 1

19-01-2021

Hi Team,

 

My usecase is to create a custom workflow activity which performs a specific(custom) logic for filtering multiple inbound records and generate its output.

For this, I have created a custom workflow activity and made changes in - 

1. Extended Workflow Schema (Elements and Methods changes)

2. Input Form

3. Created a Custom Library JS code containing simple business logic

 

I was wondering how can I connect/map the workflow activity execution to my custom library js code.

 

Currently, while configuring the activity, I am able to see logs in web logs as its makes a soap call on leave as mentioned in input form.

But when starting the workflow it errors out on the custom activity (no clue as of which js method is getting invoked while execution)

 

Please let me know if the flow for creating a custom workflow activity is right as mentioned above or anything else needs to be done. I have been looking for answers in the forum.

Thanks in advance!

View Entire Topic

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,087 posts

Correct Reply

506 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,087 posts

Correct Reply

506 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

20-01-2021

Hi,

 

For xtk:workflow schema element:

 <element name="foo" template="xtk:workflow:activity">
  <attribute default="'/bar/foo.js'" name="library"/>
</element>

 

Create 2 functions in bar:foo.js global namespace:

  • foo_call () {} // no args, return 0 for success
  • foo_recall () {return 0} // i have no idea what this does but it's always stubbed to return 0

 

For workflow activities when starting out I've found the crm connector activity to be the most useful reference.

There is way more code than needed and it's not consistent in how it integrates with Campaign, but in total it's comprehensive.

 

Thanks,

-Jon