Scripted Lane issues

499 views
Skip to first unread message

stor...@gmail.com

unread,
Jun 26, 2018, 8:58:11 AM6/26/18
to Fujitsu RunMyProcess Developer Community
Hi there

I am trying to create a scripted lane where the I read users from a collection into the lane.

I am trying to do it like this:
${load_object({"location": "Göteborg"}, "location").users?seq_contains(P_user.login)}

The above works fine when testing it, but fails when I click check script in the scripted lane itself. Fails with this error:
Syntax invalid - Undefined or malformed load_object (in 0.008 sec)

I found this link:
http://docs.runmyprocess.com/Developer_Guide/Rights/Scripted_Lanes#31-freemarker-methods

Do I understand it correctly that scripted lanes do not allow calls towards databases and is limited to that small collection of methods?

Regards
Svensson, Peter

Vitthal Jivrag

unread,
Jul 3, 2018, 2:17:20 PM7/3/18
to suppor...@runmyprocess.com
Hi Peter,

Apologies for delay in response. 

Rules for the expression in Scripted lanes:

Only the listed Properties and FreeMarker Methods or Built-ins are supported.
Expression could be a combination of logical parts separated by && or ||.
Supported evaluation order is variable operator value (value operator variable is not supported)

Scripted lane formula should not have long / complex operations. 

You can use Runtime lane for complex operations.
Using the Runtime Lane, in your process you should be able to assign the tasks dynamically using the following 2 functions to add / remove users from lane:
P_add_user_to_lane(laneId, userId) 
P_remove_user_from_lane(laneId, userId)

Thanks & Regards,
Vitthal Jivrag
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/b11f47db-6cd0-4942-84d7-89b08f62c4f6%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

Dipen Raval

unread,
Jul 4, 2018, 11:42:11 PM7/4/18
to Fujitsu RunMyProcess Developer Community
Hi Peter,

Could you please confirm that issue has been clarified?
Please don't hesitate to contact us for any further query.

Thanks & Regards,
Dipen Raval
Fujitsu - RunMyProcess Support

stor...@gmail.com

unread,
Jul 5, 2018, 5:36:11 AM7/5/18
to Fujitsu RunMyProcess Developer Community
Hi there.

Yes, this confirms my suspicions.
It's a shame, but I'll work around that.

Regards
Svensson, Peter

Pankaj Kumar

unread,
Jul 5, 2018, 7:21:18 AM7/5/18
to Fujitsu RunMyProcess Developer Community
Hi,

In scripted lane, you can not make query on collection and assigned user to scripted lane, it will gives you error,

Error Detail:-

FMT1UNKNOWN_PROPERTY_EXCEPTIONThe property(metadata or preferences) is unknown
WorkAround:- You can use metadata and save " location" details in user metadata rather than in a collection. Also scripted lane do do not detect changes in collection data, however if a user meta data is updated, scripted lane will be computed.  Scripts are computed in batch: Therefore it could take up to maximum 5 minutes before being computed.

Also You can use "RunTime" role as suggested by "Vitthal" in previous post.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


Regards
Svensson, Peter

--
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/.

Gunjan Rajgure

unread,
Jul 7, 2018, 11:21:56 AM7/7/18
to Fujitsu RunMyProcess Developer Community
Hello,

Have you tried workaround solution provided by Pankaj?
Awaiting for your response.

Do feel free to contact us for any other query you have.


Thanks & Regards,
Gunjan Rajgure
Fujitsu RunMyProcess Support




--
Thanks & Regards
Gunjan Rajgure
Fujitsu - RunMyProcess Support

Dipen Raval

unread,
Jul 9, 2018, 6:56:16 AM7/9/18
to Fujitsu RunMyProcess Developer Community, stor...@gmail.com
Hi Peter,

Awaiting for your feedback to update the case.

Thanks & Regards,
Dipen Raval
Fujitsu RunMyProcess Support

stor...@gmail.com

unread,
Jul 9, 2018, 7:46:56 AM7/9/18
to Fujitsu RunMyProcess Developer Community, stor...@gmail.com
Hello

Sorry for the delayed response.

I am currently on vacation and will look closer into this when I get back to work :)

Regards
Svensson, Peter

stor...@gmail.com

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

I have now solved this issue.

Rather than using a seperate database to connect with the scripted role, I have added a new field for the users. Into which I've added the data I need.

The script has been changed to check for that field, and is working perfectly fine.

A short question though, how often does a scripted role rerun the script?

Regards
Svensson, Peter

Vitthal Jivrag

unread,
Jul 30, 2018, 10:06:42 PM7/30/18
to suppor...@runmyprocess.com
Hi ,

Apology for delay in response 
Once you have created your script, The result will show you how many users meet the criteria (and so will be members of the lane)
and the duration of the query.Scripts are computed in batch Therefore it could take up to maximum 5 minutes before being computed.
When a script is computed, all the users matching the script become part of the role.
 
For more information regarding scripted lanes you can go through given link.

Do feel free to contact us for any other query you have. 

Regards, 
Vitthal Jivrag 
RunMyProcess Support


Regards
Svensson, Peter

--
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/.

stor...@gmail.com

unread,
Jul 31, 2018, 2:20:13 AM7/31/18
to Fujitsu RunMyProcess Developer Community
Hi again

So the original issue here has been solved.

I still have a few questions, but I don't know if you want me to make a new group of questions or not. So I make them here for now, please inform me if you want these somewhere else.

Looking at User Guide you have linked I see that there's only a few circumstances in which the role is updated:
"1.1 Script computation

Membership of a scripted lane is re-computed under the following circumstances:
1.Modification of the script for the lane;
2.Modification of a user's settings;
3.Modification of a user's metadata;
4.Modification of a user's preference;
5.Modification of one lane referenced in the script.

Only impacted scripted roles (because of a script change or user metadata / preference / settings update) are computed."

When it says "a user's" does that include all available users, or only the users that are related to that lane?

Is there a way to set a lane to retrigger the computation, say every night?

MvH
Svensson, Peter

Vitthal Jivrag

unread,
Aug 1, 2018, 5:31:41 PM8/1/18
to suppor...@runmyprocess.com
Hi,

As per your previous response i can see you know the circumstances in which the role is updated.

When it says "a user's" does that include all available users, or only the users that are related to that lane?
        It will Check for all available users if they satisfy the criteria. A user will be a member of a Scripted Lane if they satisfy the criteria set for membership by the script which defines how membership should be determined.
Is there a way to set a lane to re-trigger the computation, say every night?
There is no need to re-trigger the the computation every night .if you are adding user or changing user's settings,metadata, preferences the computation get triggered automatically.

Do feel free to contact us should you have any further queries. 

Regards, 
Vitthal Jivrag 
RunMyProcess Support
Svensson, Peter

--
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/.

stor...@gmail.com

unread,
Aug 2, 2018, 2:28:06 AM8/2/18
to Fujitsu RunMyProcess Developer Community
Hi there.

I was mostly looking for confirmation :)

Thank you for the help!

Regards
Svensson, Peter

Reply all
Reply to author
Forward
0 new messages