Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Khushabu_Agrawal

New Member
Registered:
Posts: 5
Reply with quote  #1 

I am designing a workflow in which I had created few dynamic roles. I wanted to use one stage of that workflow in such a way that roles assigned to that stage will change as per condition. (Depends on Yes/No value of one dropdown). For e.g. If Yes I want to assign Role A and if NO Role B should be assigned to a same stage.
So I am looking for approach - On Do this of a stage can I use -
 “(Condition)? (If True assigns Role A): (else assign Role B)”

I want a query for how to assign a role.

0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #2 
You can create a dynamic role with that/appropriate logic in it and that role determines A or B.  (I often use that for A or empty, but A or B works just the same.)  Then assign the dynamic role to the places (stage/actions) as appropriate.
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #3 
I would use a function, to be frank. Pass in the values(s) to be examined, and then return the results of a chosen SQL query. Return a List, and use use ".List" at the end of the SelectSql() function. The SQL should extract the user names, most likely from the eAssignment table in this case, I would think.
__________________
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.
0
Khushabu_Agrawal

New Member
Registered:
Posts: 5
Reply with quote  #4 

Hi BMellert, Thanks. I had thought of this approach, but then for this I might need to create lot many roles in future. So I am looking for another solution.

Hi Jerome
Thank you for your suggestion.
I tried to write Sqlfunction and able to retrieve the role list.
Now I want to assign this value to a variable by which I could set role of that stage.
I am looking for a ework  property using which I could set the role.
I tried using %ToDoList; but it is giving me an error %ToDoList variable not found.
For e.g.

(Condition)? (%ToDoList := (Sql Query)) : ()

Can anyone provide me syntax which I could use to set the roles?

0
Khushabu_Agrawal

New Member
Registered:
Posts: 5
Reply with quote  #5 
I modified the statement as- 
(Condition)? (%ToDoList := %SelectSQL(Sql Query)) : ()

Now I am not getting an error, but still It is not showing me any results.
0
Khushabu_Agrawal

New Member
Registered:
Posts: 5
Reply with quote  #6 
I also tried following syntax:-
%ToDoList:=(%Evaluate((condition)?(%SelectSQL(sql function)):())) // It gives an error variable %ToDoList not found.

However
%ToDoList:=%SelectSQL.list(%Evaluate((condition)?(%SelectSQL(sqlfunction)):())) // Throws an error can not find DLL SelectSQL.dll
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #7 
Whoops! Ignore that, I was thinking this was version 9.....

you need a comma delimited list in version 7 (and before), and wrap it in a %Evaluate() function.

Quote:
Originally Posted by Jerome
I would use a function, to be frank. Pass in the values(s) to be examined, and then return the results of a chosen SQL query. Return a List, and use use ".List" at the end of the SelectSql() function. The SQL should extract the user names, most likely from the eAssignment table in this case, I would think.

__________________
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.
0
Khushabu_Agrawal

New Member
Registered:
Posts: 5
Reply with quote  #8 
Hi folks,

I got a solution for this.
Please go through below link:- (See the solution proposed by Jerome) (Post #4)

http://metastorm.processmapping.com.au/post?id=4231029

I was able to do this using this approach:

On Do this of stage I had assigned a value (i.e. Role Name) to one variable say "Temp";

(Condition) ? (Temp:=""):(Temp:="");

and then I had created new dynamic role with formula:

%Evaluate(%selectSQL("SELECT eUserName FROM eAssignment WHERE eRoleName = '%Temp' ",,,%Chr(44)))

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!