You are viewing limited content. For full access, please sign in.

Question

Question

How to export Business Process History from an entry

asked on September 27, 2017

What is the best way to export the business process history from an entry? This is the data stored on the Business Process tab in the entry:

 

Thanks!

0 0

Replies

replied on October 6, 2017

I guess this entry is for anyone else who is curious about this subject. I posted to a separate answers question and have also not received any feedback from there either.

I found the business process details data in a view that lies in the Workflow database. In our case this will be fine to use since we need to modify a collection of existing documents. Going day forward, we will use the Associate Entries workflow activity to tie all future records together. Once completed, we will combine the pages therefore having all the business details for each entry as well as all the pages.

A word on using views: they could potentially change for upcoming Laserfiche versions, so using them for long term stable projects isn't best practice (in my opinion). The good news is that the data is there.  Even though the data appears in the client, it is actually housed in the Workflow database.

 

Hope this helps someone years from now :)

1 0
replied on December 9, 2018

Hi Chris,

Is there any way to export this history from SDK ?

0 0
replied on December 10, 2018

I have not been trained on the SDK, so I can't answer that one. Sorry. The data can be viewed with any report writing tool or SQL server itself. If I remember correctly, the views are titled intuitively. I would guess it is one of the 'BP' views:

1 0
replied on December 10, 2018

Oops, I missed this thread originally. Laserfiche will not guarantee the structure of tables through upgrades, but we will keep the views used for business process reporting.

2 0
replied on December 10, 2018

It's good to know that you will keep views.

Also it will be great if we can use SDK.

0 0
replied on December 11, 2018

You could also use Forms lookup pointing to the view. Or Workflow querying the view. 

I asked if SDK can make queries in SQL here.

Best of luck.

0 0
replied on December 11, 2018

With the SDK, you can get the business process history like this:

foreach (BusinessProcessEntityInfo entity in BusinessProcessEntity.EnumByEntry(entryId, session))
{
    BusinessProcessInfo bpeInfo = BusinessProcess.GetInfo(entity.BusinessProcessId, session);
    // Use bpeInfo to get the BPE name & duration

    var journal = new Journal(bpeInfo);
    var reader = journal.Read();
    while (reader.Read())
    {
        JournalEntry journalEntry = reader.Item
        // Each journalEntry is a step in the BPE history ('Running', 'Completed', etc...)
    }
}

 

2 0
You are not allowed to follow up in this post.

Sign in to reply to this post.