P_add_user_to_lane becomes null

617 views
Skip to first unread message

stor...@gmail.com

unread,
Jun 20, 2018, 3:53:04 AM6/20/18
to Fujitsu RunMyProcess Developer Community
Hi there.

I have a freemarker script that is behaving very strangely.

When I run it, it returns "Unexpected error: null (1 attempt)".

After trying to remove all logic in the script, I can see that it is the method P_add_user_to_lane that has become null somehow?

What is more peculiar is that the same code works in some cases but not others, but I am unable to identify the difference between them?

I have created the script as a .ftl file that have been used within two different processes, through a script activity box. It works in one of the processes, but not the other?

In the process where it does not work, I have used the same code as a output variable setting code, and the code works fine?

I am very confused as to where the issue is coming from.
Is P_add_user_to_lane somehow circumstantial in some way?

The code I've written is simply this:
${ P_add_user_to_lane(441917, "us...@email.fake") }

Regards
Svensson, Peter

error.PNG

dra...@runmyprocess.com

unread,
Jun 20, 2018, 6:51:38 AM6/20/18
to Fujitsu RunMyProcess Developer Community, stor...@gmail.com
Hi Peter,

To use "P_add_user_to_lane" freemarker method, following conditions
should be satisfied.

1. This method will throw an error if the specified lane is not a runtime lane.

2. This method will have no effect in TEST mode. (please run your process in

"Acceptance" or "Live" mode)

For more information please refer below link.

Reference Link :

http://docs.runmyprocess.com/Developer_Guide/Rights/Runtime_Lanes

Please don't hesitate to contact us for any further query.


Thanks & Regards,
Dipen Raval
Fujitsu - RunMyProcess Support

stor...@gmail.com

unread,
Jun 20, 2018, 8:00:19 AM6/20/18
to Fujitsu RunMyProcess Developer Community, stor...@gmail.com
Hi there.

I run it within a process, as a freemarker script.

I have run the method as an output variable from an activity. This version works without any errors, even returns the users that are allowed in the lane.

When I run the same method, identical code, as a script activity I get a null error. No matter which mode I use.

If I change the laneId to an incorrect I get a different error when written in output variable rather than used in a script activity.

So it is clear to me that there is a difference between the two ways to run the freemarker code. But I don't understand why?

Also, I would much rather have the code as a script so that I can more easily reuse and refine the code.

Regards
Svensson, Peter

Pankaj Kumar

unread,
Jul 25, 2018, 5:19:59 AM7/25/18
to Fujitsu RunMyProcess Developer Community, Peter Svensson
Hi Peter,

Sorry for delay in response.

I have made the test of method "P_add_user_to_lane" using it in output parameter and in script, however I am not able to reproduce the issue.
Please refer to attached screen-print of the same.

If you still face issue, kindly share more details on how to reproduce it also please make sure you are following below information while implementing the method.
  • Please note that once you have made a lane a runtime one, you cannot change it for a different type of lane. Similarly, existing lanes of another type cannot be changed to be Runtime ones.
  • P_add_user_to_lane : adds a given user to a specified lane
  • P_remove_user_from_lane : removes a given user from a specified lane
  • Those two methods will throw an error if the specified lane is not a runtime lane
  • Those two methods will have no effect in TEST mode.
  • Those two methods will return a list of user ids (that are part of the specified lane)

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/b324b9fd-2ff8-4c82-9057-3886b3af1bef%40runmyprocess.com.

1.PNG
2.PNG
3.PNG
4.PNG

stor...@gmail.com

unread,
Jul 26, 2018, 7:44:15 AM7/26/18
to Fujitsu RunMyProcess Developer Community, stor...@gmail.com
Hi there.

I didn't solve the issue, sadly, but I did change to a dynamic role instead of a runtime one. Things are working for me now.

Sadly I don't really have any suggestions of how to reproduce this issue either, I wasn't able to figure out the difference between the two processes :(

Thank you for the response!
Regards
Svensson, Peter

Reply all
Reply to author
Forward
0 new messages