ARIS Community - We Love BPM

How to call the model transformation in a Macro?

Ana CSequeira's picture
by Ana Sequeira in Professional ARIS posted on 2016-12-19


Hello, I need to build a macro that calls this transformation from aris arquitect? is it possible?

What is the right function to do this? I am trying to use :

Macro class ModelTransformation - Method doTransformation

But i am not sure how to call this function, don't know what to write in the string parameter

doTransformation ( Model p_SelectedSourceModel, Database p_TransformationDatabase, String p_TransformationId, MTExecutionMacroOptions p_TransformationOptions, boolean p_bForceOpenResult, boolean p_bShowResultDialog )

Aris help says:

specifies, which transformation should be executed

Sorry there are no tags
There are no attachments
Ana Sequeira posted on 2016-12-19

I am trying:


 selectedLanguage = Context.getSelectedLanguage();
    selection = Context.getSelectedModels();
    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

                ModelTransformation.doTransformation(currentModel, dbGatcha, "EPC2BPMN", ModelTransformation.createDefaultExecutionOptions(), true, true);
                // var efetuaTransformacao = transformationEPCs(selection, dbGatcha);
                var end = 0;


and i get the error:  expecting at least 36 characters

Ana Sequeira posted on 2016-12-19

Ok, I was suppose to do have instead of "EPC2BPMN", should have the ID of the transformation:

"2ffa8851-a1ee-11de-4531-00155882d57a", but now got a transformation fail , what could be the problem?