Cancel
Showing results for 
Search instead for 
Did you mean: 

The syntax is invalid for the condition

Creator
Creator

Hello, all!

 

I`m trying to add condition to custom workflow to let it run only by users with role Librarian.

For that purpose i`ve created condition :

Signuture: R4_WFFilterLibrarySolution ( UserSession o )

Expression: o.role_name="Librarian"

1.png

And tried to add to my workflow but see error "The sysntax is invalid for the condition..."

2.png

 

What am I missing? I need help from some experts in conditions I guess

 

 

5 REPLIES

Re: The syntax is invalid for the condition

Pioneer
Pioneer

Hi @heze88

 

Select business object and userr session  fir input parameters.

wf1.JPG

 

For writing condtions Follow:

 

wf2.JPG

 

Thanks.

Re: The syntax is invalid for the condition

Creator
Creator

Hi, @siemi

 

I`ve seen this example in manual but I think it is not what I need - this example about group, not role:

u.fnd0ConditionHelper.fnd0isSubGroupOf( u.group, "Engineeering" )

maybe it is possible to adjust it to role?

u.fnd0ConditionHelper.( u.role_name, "Librarian" )

 I`ve tried to use some simple example like defoult conditions:

Fnd0AccessInboxPrivilege

23-05-2018 14-28-59.png

Fnd0CanCreateQualification

23-05-2018 14-29-06.png

 

but it still the same error(

Re: The syntax is invalid for the condition

Creator
Creator

Here is my working variant (I`ve just switched to Item level instead of ItemRevision):

3.png

 

Re: The syntax is invalid for the condition

Legend
Legend

A quicker method which doesnt involve a BMIDE deployment would be to use the handler EPM-check-action-performer-role on a validate task at the start of the workflow with an argument of -responsible = group::role

 

Rich

Richard Bennett
PLM Consultant
Prospect PLM Ltd

Re: The syntax is invalid for the condition

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi,

 

You can use the following syntax:

 

Signuture: R4_WFFilterLibrarySolution ( WorkspaceObject o ,  ImanType t , UserSession u )

Expression: u.role_name="Librarian"