Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
RubioIER

Member
Registered:
Posts: 40
Reply with quote  #1 

I am trying to get a folder out of a system stage using a flag.  The issue is we are doing something out of the box, and cloning a folder while it’s in the conditional action.  We're calling the clone stored procedure ourselves.  The Parent is moving down to the Alias Review Stage, while the Clone is stuck in the system stage.  The conditional action is calling the Move Clone Flag at the end of the “When Action Completed.”  The flag is being called, I see it pop up in the eraisedflag table.

 Here's the code:

 
%dtmCloneDateTimeStamp:=%System.Time
%txtCloneUserName
:="CloneAction"
%txtCloneDateTimeStamp:=%FormatTime(%dtmCloneDateTimeStamp,yyyy-mm-dd hh:mm:ss)
%ExecProc("EWORK.DONCJIS_CLONE_FOLDER",%FolderID,%Action.Name,%ServerName, %txtCloneUserName, %txtCloneDateTimeStamp);
%txtNewCloneEFID:=%SelectSQL("SELECT EFOLDERID FROM EFOLDER WHERE (EACTIONUSER = '%txtCloneUserName') AND (EPARENT = '%FolderID') AND (TO_CHAR(EACTIONTIME,'YYYY-MM-DD HH24:MI:SS') = '%txtCloneDateTimeStamp') ");
%ExecSQL("INSERT INTO EW_PER_ALIAS (PER_EFOLDERID,ALI_EFOLDERID, CREATED_BY,CREATED_DATE) VALUES ('%txtPersonFolderID','%txtNewCloneEFID','NCIS1TST,LE1TST','%FormatTime(%System.Time,dd-MMM-yyyy)')");

%ExecSQL("INSERT INTO EW_PER_ALIAS (PER_EFOLDERID,ALI_EFOLDERID, CREATED_BY,CREATED_DATE) VALUES ('%txtPersonParentEFID','%FolderID','NCIS1TST,LE1TST','%FormatTime(%System.Time,dd-MMM-yyyy)')")
 

%RaiseFlag(flgMoveClone,%FolderID,)

 
Is there a reason my folder isn’t moving out of the System Stage?  Any Thoughts?

Thanks in Advance!

0
Doogal

Avatar / Picture

Guru
Registered:
Posts: 1,564
Reply with quote  #2 

My guess is that when the engine clones a folder it does other stuff other than just call the stored procedure, like check to see if the cloned folder has other work to do. I'm not sure how you could make the engine take notice of the cloned folder and action it. Why are you not using the standard clone folder functionality? 

0
KarlD

Avatar / Picture

Guru
Registered:
Posts: 113
Reply with quote  #3 
If you are using 7.x you might want to think about removing the ExecProc referrence. Replace it with some other SQL execution string as the out of the box one with Metastorm BPM just isnt working.

Try removing just this line and see if the activity finishes.

If you have the ExecProc issue then it will simply hang and never complete. Try simply replacing it and it might work.
0
RubioIER

Member
Registered:
Posts: 40
Reply with quote  #4 
Quote:
Originally Posted by Doogal

My guess is that when the engine clones a folder it does other stuff other than just call the stored procedure, like check to see if the cloned folder has other work to do. I'm not sure how you could make the engine take notice of the cloned folder and action it. Why are you not using the standard clone folder functionality? 

It's cloned in a conditional action.  I don't always do the clone, only if the parent has a parent.  Also, if it's cloned, different associations have to be made. Unfortunately, the standard clone folder functionality does not allow for the restrictions that I need.

I think the order of actions is not right.  Although I have the raise the flag code at the end, it's not commiting the clone until after the flag is raised.  I'm not sure if that is the problem, and if it is how to fix it.

0
KarlD

Avatar / Picture

Guru
Registered:
Posts: 113
Reply with quote  #5 
A flag does not action immeadiatly. It waits till sufficient processing time is available before processing.

If you want a folder creating imeadiatly then the Transaction Protocal element is the way to go. This will return the folder ID of the created folder.

Or you could set up the cloning to generate a flag as and when it passes into the system stage and then this could be used by the parent as a trigger to populate the child etc.

There are any number of options that could be taken.

What exactly is the issue?
0
Paul

Avatar / Picture

Veteran
Registered:
Posts: 150
Reply with quote  #6 
Is there an error being generated by the "on entry" code of the next stage? This can cause it to fail to progress...?
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #7 
Don't get me wrong, but this seems like a very complex way to do something very simple.

Can you outline what you are trying to achieve, and why you took this approach?


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