Minimal template project to get started quickly with the Mendix Model SDK. Used at the MendixWorld 2016 Model SDK workshop.
Run the following steps once to get started
- Make sure that node.js / npm (4.0 or higher) is installed on your machine.
- Clone (or download) this repository:
git clone https://github.com/mendix/model-sdk-template.git
- Run
npm install
in the cloned directory to install all dependencies.
Modify the index.ts
file with the required details for USERNAME
, APIKEY
, PROJECT_NAME
and TEMPLATE_MPK
:
- The username is your login name used at https://home.mendix.com
- ApiKey's can be obtained from your personal profile page at https://home.mendix.com
- Project name is a descriptive field for this project
- The template MPK should be a (relative) path to an
.mpk
file, which can be created using theFile > Export Project Package...
function in the Mendix Business Modeler (Should be Mx 6.0 or higher project).
Add your own logic in the processWorkingCopy
function.
Make sure to invoke done()
once the script has finished.
Use the model.exportMpk
to download the changed working copy if needed (working copies are wiped after 24 hours).
- Use
npm start
to run the script. It will create a new online working copy from the template MPK before invokingprocessWorkingCopy
- Use
npm start <working-copy-id>
to run the script on an existing working copy.
- Getting started with the Mendix SDK's
- Reference documentation on the Mendix meta model
- Model SDK api docs
This template project is minimal and doesn't integrate with the mendixplatformsdk
(which provides functionality to import and export working copies to the team server).
Neither does it provide TypeScript typing for Node itself, promises etc.
For a more elaborate template project see mendixplatformsdk-examples