Mendix SDK: Get all activities of microflow

1
Hi all, i try to get all activities of one microflow by sdk. Target is to find all rest calls i use in one microflow. The documentation did not help me that much. Maybe it is not possible, but i can not imagine that. Thanks in advance.
asked
1 answers
1

Hi Christian,

 

Maybe this helps you

 

    let microflowInt = model.allMicroflows().filter(mf => mf.name == "MyMicroflowName")[0];
    const mf = await microflowInt.load();
    mf.objectCollection.objects.forEach(obj => {
        if (obj instanceof microflows.ActionActivity){
            const aa = obj as microflows.ActionActivity;
            //console.log('rca', rca);
            if (aa.action instanceof microflows.RestCallAction) {
                const rca = aa.action as microflows.RestCallAction;
                console.log('rca', rca.toJSON());
    
            }
        }
    })

 

Edited: the RestCallAction is the action of the ActionActivity

 

answered