Profile picture for user Nique

Hi,

how can I highlight an ObjOcc in a Model for a report?

We plan to build a process-book that contains the process map on the first page. The selected (and reported) process is somewhere down (3rd-level) the tree and not all users know the main process the reported process belongs to. I can imagine a red rectangle around the main process, or probably the shadow-option?

The model-comparsion report do something similar, but it creates complete new models. I don't want to have some more models in the DB only used for reporting. So is there a solution to do it without storing in the DB?

Regards,

Dominik

by Mayur Patel
Posted on Tue, 02/26/2013 - 11:04

Hi,

 

Not sure if this will work as I havent tried it myself.

You could use createRoundedRectangle to

1. place a rectangle around the object

2. save the model (to ensure the rounded rect appears in a model graphic)

3. extract a model graphic

4. remove the rounded rectangle

5. save the model

 

The only issue I see with this, is that the model's attributes will be changed every time you run the script.  

 

If you have any issues, let me know and I'll try to actually do this

 

Regards

Mayur

0
by Dominik Jenzer Author
Posted on Wed, 02/27/2013 - 14:08

Hi Mayur,

Thank you for your help, that drived my the right way. But I could exclude step 2 and 5, it seams, that the model will be written anyway.

It is very important to remove the rectangle! And be aware of any other script errors. It may be, that the report stop and you didn't cleanup. So the model will still contain the rectangle!!!

Here some code I used:

function drawRectangle(oobjocc, ncolor) {
  var oroundrect = oobjocc.Model().createRoundedRectangle((oobjocc.X() - 30), (oobjocc.Y() - 30), (oobjocc.Width() + 60), (oobjocc.Height() + 60));
  oroundrect.setRoundness(5, 5);
  oroundrect.setZOrder((oobjocc.getZOrder() - 1));
  oroundrect.setPenStyle(Constants.PS_NULL);
  oroundrect.setBrushColor(ncolor);
  
  return oroundrect;
}

(based on a similar function of the model-compare-report - Thank you guys)

The call of the function above:

g_gGPOcc = drawRectangle(g_oGPOcc,RGB(255,0,0));

Please make sure, that g_gGPOcc (contains the graphical Object) and g_oGPOcc (is the Occurance to highlight) are global variables, because you need them for the cleanup:

g_oGPOcc.Model().deleteGfxObj(g_gGPOcc);

As you can see in the code, I work with the Occurance, not the Object-Definition! This is well designd by ARIS-Stuff, because like this, the based model is defined too (see "Model()" in the method-pipe of creation and deletion of the grafic.

Ah, and don't forget to output the model once in the report ;-)

Good luck to all trying.

Dominik

 

RGB is the following simple function:

function RGB(r, g, b) {
 return (new java.awt.Color(r/255.0,g/255.0,b/255.0,1)).getRGB() & 0xFFFFFF
}

 

 

 

0

Featured achievement

Question Solver
Share your expertise and have your answer accepted as best reply.
Recent Unlocks
  • BZ
  • Profile picture for user TEF_Bernd
  • ПЦ
  • CR
  • BH
  • 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