내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Pass through data from input form in Workflow to Javascript file

Avatar

Level 3

Hello! Im currently building a custom activity in my extension workflow. But where Im stuck right now is where I need to pass on the values that has been put in on the custom activity node to the javascript. 

 

Use-case: We need a new Activity node where users can add title, text, start- and end-date, and some other information that we want to send via an API to an endpoint. These values will then be displayed on the customers private page.

 

The activity that I have created:

marting66652718_0-1677146320082.png

Input form:

marting66652718_1-1677146384166.png

Extension of the workflow schema:

marting66652718_2-1677146490749.png

And then I have a javascript value that will send the values from the input-form to the API, but currently Im using dummy-data, as Im not able to get the values from the workflow.

 

So that is what I need help figuring out. When a user starts a workflow and runs the custom activity, I want that specific data to pass on to the javascript file. Lets call it abc:javascriptfile.js.

 

Hope someone know how to help!

 

Best Regards,

Martin

 

 

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hello @marting66652718 

 

Try this.params.activity.title


     Manoj
     Find me on LinkedIn

원본 게시물의 솔루션 보기

6 답변 개

Avatar

Community Advisor

Hello @marting66652718 

 

Within the element tag of the custom activity in a workflow, schema add this code to call your js file

<attribute default="abc:javascriptfile.js" name="library">

 


     Manoj
     Find me on LinkedIn

Avatar

Level 3

Hi! 

 

I already have that in the schema:

    <attribute default="'lf:communicationService.js'" name="library" type="string"/>

 

But not sure on how to use the data from the activity in the javascript-file called lf:communicationService.js.

Avatar

Community Advisor

Hello @marting66652718 

 

You should be able to get the attributes in your _call function with 

activity.@title

activity.@textField

     Manoj
     Find me on LinkedIn

Avatar

Level 3

Hi, that didn't work. Not definition of activity.

Avatar

정확한 답변 작성자:
Community Advisor

Hello @marting66652718 

 

Try this.params.activity.title


     Manoj
     Find me on LinkedIn

Avatar

Administrator

Hi @marting66652718,

Was @_Manoj_Kumar_'s solution helpful to resolve your query? In case it was helpful, then kindly choose it as the 'Correct Reply'. If not and you still need more help, then do let us know.

Thanks!



Sukrity Wadhwa