Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment   Page 2 of 2      Prev   1   2
jpesout

Avatar / Picture

Veteran
Registered:
Posts: 107
Reply with quote  #16 
Btw, how often do you run the scheduled task? We have some cases we need to run flag action "right now", so one minute interval would be the edge.

I had an issue, when I didn't pass the FlagName, then engine stuck at this record and didn't raise any other flags and rows started to accumulate. So I was able to examine the records in the eRaisedFlags table and FlagName was included in FlagData (even in records created by eRaiseFlag.exe). So this is based on my observations, but any other explanation is welcome.
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #17 
My particular tasks run on a regular/defined schedule.

If you want it to be more dynamic, I guess the question is what causes your DB procedure to run in the first place.  A call to the OS or something which raises a flag, perhaps a dummy flag even, would process records inserted "externally".  The scheduled task that runs my DB procedure then calls eRaiseFlag once the procedure is done so the engine begins to process the records.

I can report I don't pass the flag name as a formal parameter when using the provided esp_eRaisedFlag_insert procedure -- just my actual parameters.  BPM would handle whatever is necessary from with the procedure.
0
cclewis

Member
Registered:
Posts: 43
Reply with quote  #18 

I wrote an insert stored procedure and although it saves the record, it doesn't actually raise the flag unless another flag is raised.  So the answer of having the OS raise the flag every hour might work considering any regular flag in the process would also cause any of the waiting flags to be raised.


__________________
Clarence Lewis
Senior Process Engineer
Business Transformation Institute
0
cclewis

Member
Registered:
Posts: 43
Reply with quote  #19 
Quote:
Originally Posted by cclewis

I'm checking to verify this information, but in “on demand” mode (polling set to 0) the event manager only looks for work to do when prompted by other parts of the engine(when they complete an action which puts rows in the eWait or eRaisedFlagtables).  On your v9 system if you enable polling in the registry for the event manager (and restart the engine) you should see the result you want.

 

The Key name is:

HKLM\SOFTWARE\Metastorm\e-work\Engine\Event manager

Or

HKLM\SOFTWARE\Wow6432Node\Metastorm\e-work\Engine\Event Manager

If Polling is non-zero then it is on.  Zero puts that engine in “on demand” mode.

 

Increment is in seconds.

 


__________________
Clarence Lewis
Senior Process Engineer
Business Transformation Institute
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #20 
Good to know, thanks!

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

Guru
Registered:
Posts: 688
Reply with quote  #21 

I have the polling set in our system, but I have it set to a few minutes apart as I didn't want the engine to constantly be bombarding the database asking if there is work to do every second.  However, I can confirm the polling does indeed work.

0
RMiranda

Member
Registered:
Posts: 25
Reply with quote  #22 
Quote:
Originally Posted by suityou01
You can raise flags by inserting rows into the eRaisedFlag table. You need to make sure the engine name is set correctly though. Also the eThreadNo field implies multithreading processing of flags but I have yet to prove that. For now just set it to 1.

Here is the stored proc I use for this purpose.

CREATE PROCEDURE [dbo].[RaiseFlag]

@FlagName NVARCHAR(63),

@FlagFolder NVARCHAR(31) = NULL,

@FlagData TEXT,

@NextRetry INT =NULL--MILLISECONDS

AS

BEGIN

-- SET NOCOUNT ON added to prevent extra result sets from

-- interfering with SELECT statements.

SET NOCOUNT ON;

DECLARE @EngineName NVARCHAR(31)

SET @EngineName = 'OCT-EWORKDEV01$OCTOPUS'

INSERT INTO eRaisedFlag(eEngineName,eThreadNo,eFlagName,eFlagFolder,eFlagData,eNextRetry)

VALUES (@EngineName,1,@FlagName,@FlagFolder,@FlagData,DATEADD(ms,@NextRetry,GETDATE()))

END

NB. If you insert rows into the eRaisedFlag table they will not "fire" until a flag has been raised by e-work in the "traditional" way - eg %RaiseFlag function from a process map. This is either a help or a hinderance which every way you look at it.

I never noticed this until I started my new job, and I have a dev box with no load on it. In the cold light of day on a live system flags are firing all the time and you will never notice it.

One other point to note is that if you raise a whole bunch of flags, e-work will burn through them sequentially. That is to say that all the flags will flow to the next stage, and if there are conditional actions coming coming out of that stage they will not fire until all the flags have come in.

Also, and sorry to keep going on, raising lots of flags has serious performance hits on a live system. Try and do it out of hours if you can. If not, then try and throttle the way the flags are raised with some sort of sleep function. This is a technique my old boss uses to great effect, credit where its due Giles. So as you raise the flags in your cursor you check the time of day. If its say 8-9 in the morning you set the delay to 2 seconds as the system is under low load. 9-12:30 set it to 5 seconds, then 12:30 til 2 back to 2 seconds (less load during a lunch hour) and so on and so on.
Hi, couple of questions:
  1. How do you get the @EngineName (ic: 'OCT-EWORKDEV01$OCTOPUS')?
  2. What should i put in the @FlagFolder ?
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #23 
The engine name can be found in eActiveEngine. If you have more than one, you may be able to get this from the eAlert table, but that is probably the engine set to manage alerts only.

The @Folder can be any folder id, or any string. If you need the folder to respond only to a particular folder raising the flag (for performance) you need to use that Folder id.

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

Avatar / Picture

Member
Registered:
Posts: 25
Reply with quote  #24 

Gentle suggestion:  If you are inserting flags directly into the eRaisedFlag table, then it's a good idea to ensure that such flags are marked as *unassigned* to a particular event manager (ie enginename/thread no).

 

So thread no = 0; and engine name empty or null (sorry, can't remember which).

 

Otherwise you are effectively telling the system that the flag in question is already marked for some event manager to work on...which is probably not what you want.

 

Ed.

 

PS  Naturally, and of course, none of the forgoing should be taken as indicating that this is necessarily a supported mechanism going forward...


__________________
Any comments I make are mine alone, and do not necessarily reflect the views of my employer...May contain nuts...Open other side up...Contents may have settled during transportation...
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #25 
I'd suggest people don't in any case! Aside from that, thanks for the details, Ed.

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