CMDBuild Forum

How to set relation attribute value via workflow api

Hi , 

In the workflow manual (page 49), there's a method to create a new relation via below code. 

e.g. 

cmdb.newRelation(“AssetAssignee”)
        .withCard1(“Employee”, cdNewEmployee.getId())
        .withCard2(“Asset”, Item.getId())
        .create();

 

If I have an attribute in "AssetAssignee" relation, e.g. isPrimary boolean. 

Is it possible to set the value of 'isPrimary' when creating the relation from API ? 

 

Thanks

At this time it is not possible.
We planned to add this API method in the upcoming 2.4.2 version (the release is planned in about two months) as you can read in the latest newsletter (second news): http://www.cmdbuild.org/en/diffusione/newsletter/cmdbuild-newsletter-n.-56
CMDBuild Team