Profile picture for user egambrell

Hi - I am trying to halt users from creating all but a 3 model types. We need users to be able to see other model types, but not generate them (so this is not something we can do via the filter).

I created an event-driven macro with:

  • Event: "Model is to be created with type and name (Vetoable)"
  • Can only be started by an event
  • "Use veto against default creation" is checked
  • Triggers are report with the code below
    var allowedTypes = [Constants.MT_ENTERPRISE_BPMN_COLLABORATION, Constants.MT_ENTERPRISE_BPMN_PROCESS, Constants.MT_FUNC_ALLOC_DGM];
    var modelType = Context.getProperty("model_type");
    if (!containsInt(allowedTypes, modelType)) {
        Dialogs.MsgBox("You are not allowed to create this model type.\nPlease contact the admin team if you believe you are seeing this in error.");
        Context.setProperty("event.veto", 1);
    } else {
        Context.setProperty("event.veto", 0);
    }
    return;
}

The macro works in generating the dialog box on the other model types, but it vetos creation regardless of model type. 

When I look at the code of the auto-generated macro, the last line is

Context.setProperty("event.veto", 1);

Why is the macro setting it to veto no matter what? Isn't the entire purpose that it should be vetoed or not according to what happens in the report?

How do I have it still allow the creation of the three allowed model types and ensure it opens properly in Connect?

by Ellen Gambrell Pelletier Author
Posted on Fri, 02/07/2020 - 18:35

One more note - I tried unchecking "Use veto against default creation."

This then has the opposite effect - the dialog box is successfully shown for the model types that are not allowed, but it doesn't veto the model creation for any model types.

0
by Jorge Reyna R.
Posted on Sat, 02/08/2020 - 02:24

Hi Ellen,

The following propertie is pre-defined
"event.veto" with value "0".

If the event permits it, execution of the ARIS default action for the event can be prevented by calling Context.setProperty("event.veto", true).

Regards.

0
by Ellen Gambrell Pelletier Author
Posted on Mon, 02/10/2020 - 15:12

In reply to by coquitorey

Hi Jorge - You can see in the report code that I set the veto in the if statement of the report.

But the problem is this:

  • In order to run a macro in Connect, it must trigger a report
  • The report uses the if statement to decide whether to veto or not
  • The veto is set on the report level, not the macro level, so the model is created anyway no matter which if statement is used
  • I cannot pull the report veto into the macro because the code is automatically generated; if I do this, the macro will not work in Connect
0
by Ellen Gambrell Pelletier Author
Posted on Thu, 02/13/2020 - 18:30

Bumping this up because I still don't have a resolution. 

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

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