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; } } } }