AS

Is it possible to call a transformation EPC2BPMN from a macro?

I am trying this:

var selection;
var groups;
var selectedLanguage;

main();

function main() {
    selectedLanguage = Context.getSelectedLanguage();  
    selection = Context.getSelectedModels(); //modelos selecionados
    var t_options = ModelTransformation.createDefaultExecutionOptions();
    var transformationGuid = "2ffa8851-a1ee-11de-4531-00155882d57a";
    var transformationProfileGuid = "304dd873-a1ee-11de-4531-00155882d57a";
    //var transformationGuid = "1f70bbf1-c61a-11e6-1351-fef14b9ee29f";
   // var transformationProfileGuid = "1faeaf51-c61a-11e6-1351-fef14b9ee29f";
    t_options.setProfileGuid(transformationProfileGuid);
    t_options.setDoSemanticChecks(false);
    if (selection.length > 0) {
        for (var i = 0; i < selection.length; i++) {
            var currentModel = selection[i];
            var dbGatcha = Context.getLoginInfo(currentModel).getDatabase(); //the database
            var currentType = currentModel.getType(); //EPC é o 13
            if (currentType == 13) {
                var encontrouEPC2 = currentType == 13; //esta a dar true
                var transformationResult = ModelTransformation.doTransformation(currentModel, dbGatcha, transformationGuid, t_options, true, true);
                var issuccess = transformationResult.isSuccessful(); 
                var t_errors = transformationResult.getErrors();
                for (var j = 0; j < t_errors.length; j++){
                    var control = t_errors [j];
                }
                var end = 0;
            }
        }
    }
}

 

but i get an error: 

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
  • MS
  • 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