Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
daiwilliams

Veteran
Registered:
Posts: 122
Reply with quote  #1 

Hi Everyone,

I am having difficulty trying to get a dynamic role working so hope you can help!

The scenario - I have an action that is viewable dependent on the value of a variable. The formula for the dynamic role is as follows -

%Evaluate(%Variable = "NO" ?(%User.Name):())

This works fine as it hides or shows the action depending on the result of the variable. It gets complicated though when you only want the action to be applied to other dynamic roles such as a group of users, and making sure the action is not available to users on the watch list etc.

I hope that makes sense and I'm hoping it's just a case of fine tuning the formula above ... but im not getting very far at the moment.

Hope someone can help!

Thanks guys.

Dai


0
sleclerc

Avatar / Picture

Senior Veteran
Registered:
Posts: 365
Reply with quote  #2 
Let's say you want only the ToDo List users to be able to see the action if the value = "NO" but not the Watch List users, then you could use:


%Evaluate(( %Variable = "NO" )?( %ToDoList(%FolderID) ):( ) )


__________________
Scott

US Navy Seals --> "The only easy day was yesterday"
0
daiwilliams

Veteran
Registered:
Posts: 122
Reply with quote  #3 
Hi Scott,

Thankyou for the reply. I've only just got around to looking at this again. What you have suggested sounds correct ... but I have another issue related to this now.

A quick explanation ...
  • The dynamic role determines if an action is displayed or not.
  • What determines this if another folder has completed a different process.
  • When the user loads the form that the action I want to display (or not) hangs off, I check to see if that process has completed (this works).
  • If it is completed then I add a value to a variable that is displayed on the form that simply says "yes" or "no".
  • If it is "yes" then the action can be displayed, if not then it is hidden.
The issue is, when I check the database the variable I am updating does not seem to be affected at all. It's seriously stumping me now! So obviously the dynamic role will never evaluate as there is a null value in the database for that folder.

I am thinking perhaps I need to assign a value, rather than what I am doing below ...

( (( (%SelectSQL("SELECT count (*) FROM eFolder WHERE (eFolder.eMapName = 'Process Awaiting Completion') AND (eFolder.eArchived = 0) AND (eFolder.eParent = '%Parent') ") = 0) )) )?((%Variable:=Yes)):((%Variable:=No))

The above statement works fine and gives me a 0 for a completed process and a 1 for incomplete, but as I say it does not seem to affect the variable on my form at all. This is run when the user loads the form.

Any suggestions are greatly received guys!

Thanks,

Dai



0
Nappy

Avatar / Picture

Guru
Registered:
Posts: 1,087
Reply with quote  #4 
The variable will never be changed in the process unless you add a timed action to the process that keeps checking or you add a flagged action to the process that gets flagged when the other process completes
The latter is probably best as it makes things more explicit.

The var will only change if you make it happen.

So you would have a flag on the process where flag is set to be fired by parent when parent closes. In the action you set the var to yes.

What you can also do is change the code of the role to not use the var but use the sql direct. This way it will be evaluted every time on the fly.

But probably the flag is better as you can then also add code to the flag to change for instance the to do list or maybe send an email "Hey something closed so now you have access to the action"

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.

PS that's for V6/7 for V9 the problem is V9 at the moment ;)
0
daiwilliams

Veteran
Registered:
Posts: 122
Reply with quote  #5 
Many thanks for this! it worked a treat and has solved a headache for me!

Dai


0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!