Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #1 
I have a form where once it's filled out it has to go to another user for approval.  For 2 locations, the user that initially fills out the form is also the approver.  I'm trying to find a way to skip the approval stage if the requester is the approver.  So far i'm coming up empty.  While taking the metastorm course last week i even asked the teacher who asked some of her co-workers and they were all stumped.

Currently i'm trying something along the lines of
***********************************************************
foreach(SelectSql(new MetastormDefault(),"SELECT eAssignment.eUserName FROM eAssignment WHERE eAssignment.eRoleName='Reviewers'"))
{
    if (eAssignment.eUserName == ProcessContext.FolderOriginator)
        intTempVar = 1;
}
***********************************************************

I have this in the stage where i then have a conditional to check intTempVar for 0 or 1, if intTempVar = 1, skip the approval stage.  But my code isn't working and the errors have not been much help.

Any ideas?
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #2 
Quote:
SelectSql(null,"SELECT COUNT(*) FROM eAssignment WHERE eAssignment.eUserName = @pOriginator AND eAssignment.eRoleName='Reviewers' "), SQLArg("@pOriginator", ProcessConext.FolderOriginator)).Integer > 0
Use that condition in a conditional action that bypasses the review stage.

__________________
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
JoeOmerta

Veteran
Registered:
Posts: 210
Reply with quote  #3 
It didn't work at first but i found i needed to remove the ')' right before SQLArg to get it to work.

Thanks!
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #4 
Ooops, quite right. The perils of typing code freehand instead of in the Designer!

__________________
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
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!