JB

Hi Eva,

I would like to build one large report that I can output the following fields against either Database level or Group. The idea is to be able to then sort the data as required using pivot tables in excel ie the need to have many fieclds in onde spreadsheet :

Process Model (Name/attributes/group)/Upstream processes(name and type)/Downstream processes (name and type) if via Group / Roles(Actors-participants) / Event(name and type) / Function(name and type) - i hope this makes sense Eva - pls let me know if it does n't - thnx JB

by Eva Klein
Badge for 'Community Team' achievement
Posted on Mon, 12/05/2011 - 14:47

To make sure that I understand correctly which result you expect in the output it would be helpful if you could provide a screenshot showing the desired report structure and contents. 

I hope that this will clarify how this can be implemented.

0
by john bennett Author
Posted on Mon, 12/05/2011 - 15:23

 please confirm you have recieved this - thnx

0
by john bennett Author
Posted on Mon, 12/05/2011 - 15:35

pls see the attached excel spread sheet

 

added comment?

0
by Abdelnacer AIT EL BACHA
Posted on Tue, 12/06/2011 - 15:59

Hi Everybody,

 

I will be also interested to see how to build this kind of report.

Tanks,

Abdel,

0
by Eva Klein
Badge for 'Community Team' achievement
Posted on Wed, 12/07/2011 - 10:54

Sorry, John I can't identify anything in your picture. 

0
by john bennett Author
Posted on Wed, 12/07/2011 - 13:53

Hi Eva, apologies for the small print - pls see the below - i hopw this is viewable for you.

Basically it is the following fields from Left to Right: Group / Process / Process Model name / Model Type / Connected Models / Participant Acter Lane / Function name / Function Type / Rule / Rule Type / Is predecessor of / Activates (source object name) -basically I am trying to get information around specifically the Actor Lane / Model name / Processes / Connected Models / Function etc hope this helps, many thanks for getting back to me

 

 

0
by Eva Klein
Badge for 'Community Team' achievement
Posted on Thu, 12/08/2011 - 09:43

Hi John,

the report below delivers the following information.

example report headline

You can start the report in the context of a database or a group.

var g_nLoc = Context.getSelectedLanguage();

var sDB = ArisData.getActiveDatabase().Name(g_nLoc)

var oOut = Context.createOutputObject();
oOut.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);

// Headline
oOut.TableRow();
oOut.TableCell("Database", 30, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_GREEN, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
oOut.TableCell("Group", 30, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_GREEN, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
oOut.TableCell("Process", 30, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_GREEN, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
oOut.TableCell("Process Model Name", 30, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_GREEN, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
oOut.TableCell("Model Type", 30, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_GREEN, 0, Constants.FMT_BOLD | Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);

var oGroups = getGroups();
for (var i = 0; i < oGroups.length; i++) {
    var oGroup = oGroups[i];
    
    var oProcesses = oGroup.ObjDefList(true/*bRecursive*/, [Constants.OT_FUNC]);
    for (var j = 0; j < oProcesses.length; j++) {
        var oProcess = oProcesses[j];
        var sProcess = oProcess.Name(g_nLoc);
        var sGroup = oProcess.Group().Name(g_nLoc);
        
        var oProcessModels = getProcessModels(oProcess);
        for (var k = 0; k < oProcessModels.length; k++) {
            var oProcessModel = oProcessModels[k];
            var sProcessModel = oProcessModel.Name(g_nLoc);
            var sModelType = oProcessModel.Type();

            oOut.TableRow();
            oOut.TableCell(sDB, 30, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
            oOut.TableCell(sGroup, 30, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
            oOut.TableCell(sProcess, 30, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
            oOut.TableCell(sProcessModel, 30, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
            oOut.TableCell(sModelType, 30, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP | Constants.FMT_EXCELMODIFY, 0);
        }
    }
}
oOut.EndTable("", 100, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
oOut.WriteReport();


function getGroups() {
    if (ArisData.getSelectedDatabases().length > 0) {
        return [ArisData.getSelectedDatabases()[0].RootGroup()];
    }
    return ArisData.getSelectedGroups();
}

function getProcessModels(oProcessDef) {
    var oModels = new Array();
    var oProcessOccs = oProcessDef.OccList();
    for (var i = 0; i < oProcessOccs.length; i++) {
        var oModel = oProcessOccs[i].Model();
        
        if (isProcessModel(oModel)) {
            oModels.push(oModel);
        }
    }
    return ArisData.Unique(oModels);

    function isProcessModel(oModel) {
        var  nModelType = oModel.TypeNum();
        if (nModelType == Constants.MT_EEPC) return true;
        if (nModelType == Constants.MT_EEPC_COLUMN) return true;    
        if (nModelType == Constants.MT_EEPC_ROW) return true;        
        //...
        return false;
    }
}

I hope this will help you. If you have further questions please feel free to ask me.

0
by john bennett Author
Posted on Thu, 12/08/2011 - 14:45

Hello Eva,

Firstly many thanks for the report. However I do not get any results at present? I get the Column titles ingreen but empty result set. Sorry to be a pain, but wondered if you had any idea why that is occuring? Is there any thing to check my end do you think? Lastly do you think it would be difficult to get the Actor (name) column inserted too?

Best Regards,

John.

0
by Eva Klein
Badge for 'Community Team' achievement
Posted on Thu, 12/08/2011 - 15:16

That's strange. You should get something like the picture below as output. 

At the moment it only works with these model types:   

function isProcessModel(oModel) {
        var  nModelType = oModel.TypeNum();
        if (nModelType == Constants.MT_EEPC) return true;
        if (nModelType == Constants.MT_EEPC_COLUMN) return true;    
        if (nModelType == Constants.MT_EEPC_ROW) return true;        
        //add your model types
        return false;
    }

What do you mean by actor? The creator of the model?

 

Regards

Eva
0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • ПЦ
  • CR
  • BH
  • Profile picture for user Ivan.Ivanov.softwareag.com
  • Profile picture for user mscheid
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock