CMDBuild Forum

Parameters passed to process from Synchronous task are null.

Hi all

I have version 2.2.1 of CMDBuild. I try to create synchronous task on card delete in task manager. I pass parameters to process like {server:MAC} but in fact on processes i see null for MAC. For some reason value from the card being deleted is not passing to process. Am I doing something wrong?

Another thing. I found following code in cmdbuild/src/main/webapp/javascripts/cmdbuild/core/proxy/CMProxyTasks.js

                                        return Ext.create('Ext.data.SimpleStore', {
                                                fields: [CMDBuild.core.proxy.CMProxyConstants.DESCRIPTION, CMDBuild.core.proxy.CMProxyConstants.VALUE],
                                                data: [
                                                        [tr.afterCreate, CMDBuild.core.proxy.CMProxyConstants.PHASE_AFTER_CREATE],
                                                        [tr.afterUpdate, CMDBuild.core.proxy.CMProxyConstants.PHASE_AFTER_UPDATE],
                                                        [tr.beforeUpdate, CMDBuild.core.proxy.CMProxyConstants.PHASE_BEFORE_UPDATE],
                                                        [tr.beforeDelete, CMDBuild.core.proxy.CMProxyConstants.PHASE_BEFORE_UPDATE]
                                                ]
                                        });

Is this a bug that PHASE_BEFORE_UPDATE is specified for tr.beforeDelete also?

Best wishes

Thank you for your submission, we've fixed the problem.
The fix will be included in next release.
CMDBuild Team

When new release is expected? Can I checkout

fix from some git or get it as patch? It's quite urgent for us. Thx

CMDBuild 2.3 will be released at the end of January

.

CMDBuild Team

But what about my first question?

 

"I have version 2.2.1 of CMDBuild. I try to create synchronous task on card delete in task manager. I pass parameters to process like {server:MAC} but in fact on processes i see "null" for MAC. For some reason value from the card being deleted is not passing to process. Am I doing something wrong?"

We are still checking.

CMDBuild Team

I have upgraded to 2.2.2. That didn't fix the problem but following messages started to appear in cmdbuild.log file

WARN  2014-12-22 17:55:22 [org.cmdbuild.common.logging] engine with prefix 'client' not found

in case i use {client:MAC}

or

WARN  2014-12-22 17:55:22 [org.cmdbuild.common.logging] engine with prefix 'server' not found

in case of {server:MAC}

 

Maybe this helps

We've fixed the problem, but will be released with 2.3 version at the end of January
 
CMDBuild Team
 
 
 
 
 
Previously Konstantin wrote:

I have upgraded to 2.2.2. That didn't fix the problem but following messages started to appear in cmdbuild.log file

Maybe this helps

 

I have found the reason. Looks like undocumented feature. In source code I've found that engine "current" should be used. Example: "{current:MAC}"

Hi,
 
Same, or similar problem, with version 2.3. {server:Attribute} does not populate the field when mapping to the process.
 
Additionally, when I'm updating a card, specifically a Lookup attribute, how could I access to the previous and new one value?
I understand "{current:} refers to the new value? what engine would be used for the old value?
 
Thanks!
 
Previously Konstantin wrote:

I have found the reason. Looks like undocumented feature. In source code I've found that engine "current" should be used. Example: "{current:MAC}"

 

Hi again,
 
Tried {previous:Attribute} :P and looks like there is no complaint in logs, but only when using "after update", and in that case, both {current:} and {previous:} return the same value.
When using "before update" I'm getting NullPointerException and fields are not populated.
 
:(
 
Previously Alex wrote:
Hi,
 
Same, or similar problem, with version 2.3. {server:Attribute} does not populate the field when mapping to the process.
 
Additionally, when I'm updating a card, specifically a Lookup attribute, how could I access to the previous and new one value?
I understand "{current:} refers to the new value? what engine would be used for the old value?
 
Thanks!
 
Previously Konstantin wrote:

I have found the reason. Looks like undocumented feature. In source code I've found that engine "current" should be used. Example: "{current:MAC}"