원클릭으로
migrate-k2-nintex
Assess and migrate K2/Nintex applications to Mendix: SmartObjects to entities, SmartForms to pages, workflows to microflows
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Assess and migrate K2/Nintex applications to Mendix: SmartObjects to entities, SmartForms to pages, workflows to microflows
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Mendix MDL authoring, project navigation, and Docker app lifecycle — entities, microflows, pages, security, navigation, OQL, REST, testing, linting, and migration. Load when working in any Mendix codebase.
MDL Agent Documents — CREATE MODEL, CREATE KNOWLEDGE BASE, CREATE CONSUMED MCP SERVICE, CREATE AGENT syntax and calling agents from microflows
ALTER PAGE / ALTER SNIPPET — SET, INSERT, DROP, REPLACE widget operations on existing pages and snippets
Migration Assessment — structured investigation of non-Mendix projects for migration planning across technology stack, data model, business logic, UI, integrations, and security
Assess Mendix Project Quality — automated linting, catalog queries, naming conventions, security, maintainability, performance, and architecture review with scored report
Browse Integration Services and Contracts — SHOW/DESCRIBE OData, REST, business event, and database connection services; query MDL CATALOG integration tables; import external entities
| name | migrate-k2-nintex |
| description | Assess and migrate K2/Nintex applications to Mendix: SmartObjects to entities, SmartForms to pages, workflows to microflows |
| compatibility | opencode |
<k2_architecture> K2 applications are fundamentally different from Mendix in how they're stored and structured.
Key Difference: K2 applications are server-side/database-stored, not file-based like Mendix. All K2 project elements and data are saved into the K2 database, not as files.
| Aspect | K2/Nintex | Mendix |
|---|---|---|
| Storage | Server database | .mpr file (SQLite) |
| Versioning | Server-managed | Git-based (MPR v2) |
| Export format | .kspx package | .mpk package |
| Project file | No single file | .mpr project file |
Middle layer between data providers (SQL, SAP, SharePoint) and data consumers (forms, workflows, reports).
| SmartObject Type | Description | Mendix Mapping |
|---|---|---|
| SmartBox | Stores data in K2's own database | Persistable Entity |
| SQL Connector | Connects to SQL Server tables | External Database Connector |
| SAP Connector | Connects to SAP systems | OData/REST Integration |
| SharePoint Connector | Connects to SharePoint lists | REST Client |
| Service Object | Exposes services/methods | Microflow/Java Action |
Browser-based forms composed of Views and Forms:
| SmartForms Element | Description | Mendix Mapping |
|---|---|---|
| View | Reusable collection of controls + rules bound to SmartObjects | Snippet or Page Section |
| Form | Container for views, accessible via URL | Page |
| Control | UI element (text, date, dropdown, etc.) | Widget |
| Rule | Event-driven logic ("when button clicked, execute method") | Nanoflow or Microflow |
| Workflow Element | Description | Mendix Mapping |
|---|---|---|
| Workflow | Full process definition | Workflow or Microflow chain |
| Activity | Individual step in workflow | Microflow activity or User Task |
| Task | Human task requiring user action | User Task |
| Destination Rule | Routing logic for tasks | Decision (microflow) |
| Datafield | Workflow data variable | Parameter or Variable |
| </k2_architecture> |
<export_options>
The K2 Package and Deployment tool packages K2 artifacts into a single file.
K2 Management Site → Solutions → Package → export
| File Type | Extension | Contents |
|---|---|---|
| Project file | .k2proj | Project structure and references |
| Workflow definition | .kprx | Workflow definition |
| SmartObject definition | .sodx | SmartObject schema |
using SourceCode.SmartObjects.Client;
SmartObjectClientServer server = new SmartObjectClientServer();
server.CreateConnection();
SmartObject so = server.GetSmartObject("CustomerSO");
</export_options>
<migration_strategy>
| SmartObject Type | Migration Approach |
|---|---|
| SmartBox SmartObjects | Direct translation to Mendix persistable entities |
| SQL Connector SmartObjects | Options: (a) Import data to Mendix, (b) External Database Connector |
| Service SmartObjects | Microflows that call external services |
Example MDL:
-- SmartBox SmartObject "Customer" → Mendix Entity
create persistent entity CRM.Customer (
CustomerCode: string(50),
CustomerName: string(200),
Email: string(200),
Phone: string(50),
IsActive: boolean default true,
CreatedDate: datetime
);
-- SmartBox SmartObject "Order" → Mendix Entity
create persistent entity CRM.Order (
OrderNumber: string(50),
OrderDate: datetime,
status: CRM.OrderStatus,
TotalAmount: decimal
);
-- SmartObject relationship → Association
create association CRM.Order_Customer (
CRM.Order [*] -> CRM.Customer [1]
);
| SmartForms Control | Mendix Widget |
|---|---|
| Text Box | TEXTBOX |
| Text Area | TEXTAREA |
| Drop-down List | COMBOBOX |
| Date Picker | DATEPICKER |
| Check Box | CHECKBOX |
| Radio Button | RADIOBUTTONS |
| Data Label | DYNAMICTEXT |
| Button | ACTIONBUTTON |
| List View | LISTVIEW or DATAGRID |
| Subview | SNIPPETCALL |
| Tab Control | Tab container pattern |
| SmartForms Rule | Mendix Implementation |
|---|---|
| When Control is Clicked | Button action microflow/nanoflow |
| When View is Initialized | Page data source microflow |
| When Control Value Changes | OnChange nanoflow |
| When Data Loads | Data source microflow |
| Execute SmartObject Method | Microflow calling entity operations |
| Transfer Data | Variable assignment in microflow |
| Show/Hide Control | Conditional visibility |
| Enable/Disable Control | Editable expression |
Example MDL (SmartForm View → Mendix Page):
create page CRM.Customer_Edit
(
params: { $Customer: CRM.Customer },
title: 'Edit Customer',
layout: Atlas_Core.PopupLayout
)
{
dataview dvCustomer (datasource: $Customer) {
textbox txtCode (label: 'Customer Code', attribute: CustomerCode)
textbox txtName (label: 'Customer Name', attribute: CustomerName)
textbox txtEmail (label: 'Email', attribute: Email)
textbox txtPhone (label: 'Phone', attribute: Phone)
checkbox chkActive (label: 'Active', attribute: IsActive)
footer footer1 {
actionbutton btnSave (caption: 'Save', action: save_changes, buttonstyle: primary)
actionbutton btnCancel (caption: 'Cancel', action: cancel_changes)
}
}
}
| K2 Workflow Element | Mendix Mapping |
|---|---|
| Start | Microflow start / Workflow start |
| Task (human) | User Task activity |
| Reference (call SmartObject) | Microflow activities (Create, Change, Retrieve) |
| Decision | Decision (split/merge) |
| Send Email | Email activity |
| Generate Document | Generate document microflow |
| Web Service Call | REST/Web service call |
| Script | Java action or expressions |
| End | End event / Microflow return |
| Escalation | Scheduled event or timer |
| Destination Rule | Microflow logic for task assignment |
Example MDL (K2 Task → Mendix Microflow):
create microflow CRM.ACT_Order_SubmitForReview ($Order: CRM.Order)
begin
change $Order (status = CRM.OrderStatus.PendingReview);
commit $Order with events;
show page CRM.Order_Review ($Order = $Order);
end;
create microflow CRM.ACT_Order_ProcessApproval ($Order: CRM.Order)
returns boolean as $Approved
begin
declare $Approved boolean = false;
if $Order/TotalAmount > 5000 then
call microflow CRM.ACT_Order_SubmitForManagerReview ($Order = $Order);
else
change $Order (status = CRM.OrderStatus.Approved);
commit $Order with events;
set $Approved = true;
end if;
return $Approved;
end;
</migration_strategy>
<assessment_workflow>
| SmartObject Name | type | data source | entity count | Mendix mapping |
|------------------|------|-------------|--------------|----------------|
| CustomerSO | SmartBox | K2 DB | single | CRM.Customer entity |
| OrderSO | SmartBox | K2 DB | single | CRM.Order entity |
| EmployeeSO | sql | HR database | single | Integration or import |
| SAPOrderSO | SAP | SAP ERP | multiple | odata service |
| Form Name | views Used | SmartObjects | Mendix mapping |
|-----------|------------|--------------|----------------|
| Customer Entry | CustomerView, AddressView | CustomerSO, AddressSO | Customer_Edit page |
| Order Dashboard | OrderListView, FilterView | OrderSO | Order_Overview page |
| workflow Name | Tasks | Activities | Complexity | Mendix mapping |
|---------------|-------|------------|------------|----------------|
| Order Approval | 3 | 12 | Medium | microflow chain |
| New Employee Onboarding | 8 | 25 | High | workflow module |
| rule ID | Location | description | Mendix Implementation |
|---------|----------|-------------|----------------------|
| R-001 | CustomerView | Email format validation | validation microflow |
| R-002 | OrderWorkflow | Orders > $5000 need manager approval | decision in microflow |
</assessment_workflow>
<migration_execution_order>
create enumeration CRM.OrderStatus as (
Pending: 'Pending',
Approved: 'Approved',
Rejected: 'Rejected',
Completed: 'Completed'
);
create persistent entity CRM.Customer (...);
create persistent entity CRM.Order (...);
create association CRM.Order_Customer (...);
create microflow CRM.ACT_Customer_Save ($Customer: CRM.Customer)
begin
if $Customer/Email = empty then
validation feedback $Customer/Email message 'Email is required';
return false;
end if;
commit $Customer with events;
return true;
end;
create page CRM.Customer_Overview (...);
create page CRM.Customer_Edit (...);
create module role CRM.Manager description 'Can approve orders and manage customers';
create module role CRM.User description 'Can create and edit own records';
grant CRM.Manager on CRM.Order (create, delete, read *, write *);
grant CRM.User on CRM.Order (create, read *, write *) where [owner = '[%CurrentUser%]'];
</migration_execution_order>
<common_challenges>
Problem: K2 stores everything in a database, no single project file. Solution: Use K2 Package (.kspx) export or K2 APIs.
| Connector Type | Mendix Options |
|---|---|
| SQL Direct | External Database Connector or data migration |
| SAP | SAP BAPI Connector, OData, or REST |
| SharePoint | REST integration via Microsoft Graph API |
| Web Service | REST/SOAP consumption |
event-based UI logic → nanoflows
validation → validation microflows + validation feedback
data manipulation → microflows
Complex calculations → microflow expressions
create microflow CRM.SUB_GetManager ($Employee: HR.Employee)
returns HR.Employee as $Manager
begin
declare $Manager HR.Employee;
retrieve $Manager from HR.Employee
where [HR.Employee_Reports = $Employee];
return $Manager;
end;
</common_challenges>
<pre_migration_checklist> Before starting migration:
During migration:
After migration:
mxcli check script.mdl -p app.mpr --references<output_rules>Output MDL code only in code blocks. Keep explanations concise.</output_rules>