Bulk archive folders

Hi All

 

We are running BPM v9 SR2.

 

We have a whole bunch of folders that are at a user stage and need to be archived. We (the IS dept) have been asked if there is anyway that these folders can be bulk archived by us rather than the users having to open each one individually and click the archive button. We've had a look at the underlying tables and various stored procedures but are nervous about modifying these directly in case we lose data integrity.

 

Therefore, is anyone aware of any way that we can safely move these folders from the current stage to the archived stage either in bulk or by some kind of automation?

 

Any help/advice greatly appreciated!

 

Andrew

Tagged:

Comments

  • You are wise not to do this directly via the DB, that never turns out well.

    There is no pre-built admin tool for this.

     

    Technically the the Archive is really just a matter of changing the eAlert for every user assigned to that folder to a tilde like so:

     

    Update eAlert 
    set eAlertType = '~', eAlertTime = getdate()
    where eStagename = '<StageName>'
    and eMapname = '<MapName>'
    

     But that does not guarantee data integrity, so it's best to avoid using brute force like this.

     

    Instead, if this is something that is likely to happen again:

     

    Modify the procedure and add a flag action that routes to an Archive Stage.

    You will also, need a common stage with an update action, this can be an timer but needs to be assigned to the stage that needs to be updated.  You will  have to execute an update for each folder (pragmatically I hope) to force the folder to add a new record in the ewait table with your new flag action.  Every folder created there after will have access to this feature.

     

    Add a check Field like 'ForcetoArchive ' or something to the procedure - this will be the control flag for the admin form, shown next.

     

    Publish the procedure, run the update action so that these now have a record in the ewait table.

    You can safely update the ForcetoArchive flag in SQL to true.

     

    Build an Admin form 

    Grid should show all folders that are marked to ForceToArchive

     

    Add an Archive button, the code behind should build a list of those folders:

    using a select statement for your procedure where ForcetoArchive  == true into an array

    Run through the array by FolderID and execute the ework.RaiseFlag(FolderID)

    for those folders.

     

    This is a a good quick admin way of forcing folders to archive, without breaking the normal Metastorm process.

    With a little bit of extension you will be able to add every folder and stage in your process so you can do the same.

     

     

  • Thank you for your quick reply.

     

    I think I understand what you are suggesting - this is our first development so I'm still learnign the ropes! I was hoping there would be a way of doing it without having to change the existing solution but I guess not. The only bit I wasn't clear on was how to execute an update for each folder. Presumably this is necesasary so that the existing folders pick up the changes introduced (flag action etc) to the process.

     

    thanks again

     

    Andrew

  • Sorry I didn't see this earlier...

    Once you modify the procedures and add in the common stage assigned to stage with the flagged action, build an admin form to execute that flag.  this will force all the stages in the engine to be updated.  If you have any timed actions etc, those will force the update on their own. 

     

    REASON:

    While requests that start after the change will be able to be actioned against this flag, previous requests must take another action before they can use this new action.

     


  • DSmith wrote:

    While requests that start after the change will be able to be actioned against this flag, previous requests must take another action before they can use this new action.


    Unless an external insert flags into eWait for the previous folders.  Others have provided solutions to this kind of activity, or it can be done via a direct insert.


  • DSmith wrote:

    Once you modify the procedures and add in the common stage assigned to stage with the flagged action, build an admin form to execute that flag.  this will force all the stages in the engine to be updated.   


    I've been thinking on this (generally a bad idea!) and must be misunderstanding you. If the newly created Flag action is not available to existing folders then how will creating an admin form to call a newly created flag be able to raise it? Won't the folder already have to have had an update in order for the new Flag action to be 'visible' to the Admin form's RaiseFlag?

     

    Thanks

    Andrew


  • BMellert wrote:


    DSmith wrote:

    While requests that start after the change will be able to be actioned against this flag, previous requests must take another action before they can use this new action.


    Unless an external insert flags into eWait for the previous folders.  Others have provided solutions to this kind of activity, or it can be done via a direct insert.


    Hi

     

    So is it ok (i.e. supported) to perform direct inserts to the eWait table - given that it is a Metastorm table I would have thought it is something that should be avoided?

     

    Thanks

    Andrew

  • no it is not supported. I have argued (well, stated, nobody acctaully replies) that The Designer should put these entries in teh database on deployment. It's not exactly rocket science.

     

    We have an admin form in v6 & 7 that does this, and it is also in our version 9 Admin tools:

    http://www.processmapping.com.au/freestuff/freemetastormbpm9solutions/AdminTools.html

  • hello
    Easiest way to perform this is :
    1)create user action without form on common stage. remember about make it visible to admon role
    2)expose it as webservice
    3)make very simple app in .net or even metastorm admon form and execute this action for every folderid you want

    We have build some .net layer on ECL and have simple utility to run ever user action on every stage on every map published on server. Base on this admin form u

  • based on this build form to make this operation is really simple. Also integration between processes without flags is very simple. I can recommend using ECL and mechanism like ours to make such things both in v7 and v9.