Skip to main content
New Participant
September 30, 2022
Question

Rule which have to return the http link is working on expression rule object but not returning when using in mail body/script task in the process model.

  • September 30, 2022
  • 10 replies
  • 0 views

The below expression rule is used to get the http url as output and is working fine in the expression rule object but whereas if the same rule is using inside of the body of mail and script task it is not returning anything.

a!localVariables(
local!startProcessLink: a!startProcessLink(
processModel: cons!TEST_PM,
processParameters: { id: ri!id, }
),
local!cacheKey: index(local!startProcessLink, "cacheKey", ""),
tostring(if(
a!isNullOrEmpty(local!cacheKey),
"",
concat(
"<a href=""",
"">companyname.appiancloud.com/.../iYBQhUjyCxCUquoIwiZAuYZ6ZpfD3jPtesTVSHGdu6Crrx8JJi3pPg
local!cacheKey,
""">link text</a>"
)
))
)

10 replies

gopalk2865
Participating Frequently
September 30, 2022

Hi hrushikeshn, Did you check the process instance? what kind of output you are getting?

New Participant
September 30, 2022

Hi Gopal, yes it is returning null 

gopalk2865
Participating Frequently
September 30, 2022

you can not use start process link in a expression rule this way. you can use this function in combination of link Filed or using dynamic link. If you can let us know the use case then we can assist you in a better way.

harshitb6843
September 30, 2022
local!startProcessLink: a!startProcessLink(
processModel: cons!TEST_PM,
processParameters: { id: ri!id, }
),

I don't think a process can be started this way. What are you trying to achieve with the above code and where is it written?

New Participant
September 30, 2022

The above code is used to return the URL for the particular task and is written in interface and we tried in expression rule, While testing the rule in the expression rule it is returning the URL, but whereas when t is used in the body of the mail and also in the script task also it is returning null values.

harshitb6843
September 30, 2022

You can only link only with a link parameter and that needs to be clicked in order to execute. So you might have to build an expression rule that does that work for you and call it in a script task to get the output.