You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com> on 2014/06/21 17:20:21 UTC

wrapSkipRules does not execute action because it's hidden

Hi to all.

Some weeks ago a commit introduced to the WrapperFactory the method:

WrapperFactory.wrapSkipRules(domainObject).actionName

that executes the action despite being hidden or disabled.


Despite working well on most situations, I've just found a case where it fails to execute the action, acting as a "normal" wrap (considering the Disabled and Hidden rules):



      // {{ ComputedValue (action)
    @Hidden
    @XMSAction(locales = @XMSLocale(locale = "es", caption = "Valor Calculado"))
    public ImpactLevel computedValue() {
	...
    }

And failing when executing:

        assertThat(this.service(WrapperFactory.class).wrapSkipRules(asset).computedValue(), is(impactLevel));


With the stacktrace:

org.apache.isis.applib.services.wrapper.HiddenException: Reason: Always hidden. Identifier: com.xms.framework.architecture.domain.model.Asset#computedValue()
	at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.toException(DomainObjectInvocationHandler.java:626)
	at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.notifyListenersAndVetoIfRequired(DomainObjectInvocationHandler.java:594)
	at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(DomainObjectInvocationHandler.java:578)
	at org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:217)
	at org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:52)
	at com.xms.framework.architecture.domain.model.business.BusinessProcess_$$_jvsta1_16.computedValue(BusinessProcess_$$_jvsta1_16.java)
	at com.xms.framework.architecture.integration.glue.business.old.AssetGlue.the_asset_with_name_has_the_asset_value(AssetGlue.java:113)
	at ✽.Then the asset with name "EAM-ASS-VAL-010-010 - Business Process" should have the asset value "null"(com/xms/framework/architecture/integration/specs/base/EAM-ASS-VAL - Enterprise Architecture Model - Assets - Valuation.feature:17)


Seems there must be a bug regarding actions without params, or something strange condition?


Thanks,

Oscar





Re: wrapSkipRules does not execute action because it's hidden

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Fixed.... as part of change that also did ISIS-827, ISIS-828, [1], [2]


[1] https://issues.apache.org/jira/browse/ISIS-827
[2] https://issues.apache.org/jira/browse/ISIS-828


On 21 June 2014 17:27, GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>
wrote:

> Hi, Dan.
>
> Created at:
>
> https://issues.apache.org/jira/browse/ISIS-818
>
>
> Thanks,
>
> Oscar
>
>
>
>
> El 21/06/2014, a las 17:46, Dan Haywood <da...@haywood-associates.co.uk>
> escribió:
>
>
> Definitely sounds like a bug... could you please raise a jira ticket?
>
> Thx
> Dan
> On 21 Jun 2014 16:20, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
> wrote:
>
>
> Hi to all.
>
> Some weeks ago a commit introduced to the WrapperFactory the method:
>
> WrapperFactory.wrapSkipRules(domainObject).actionName
>
> that executes the action despite being hidden or disabled.
>
>
> Despite working well on most situations, I've just found a case where it
> fails to execute the action, acting as a "normal" wrap (considering the
> Disabled and Hidden rules):
>
>
>
>      // {{ ComputedValue (action)
>    @Hidden
>    @XMSAction(locales = @XMSLocale(locale = "es", caption = "Valor
> Calculado"))
>    public ImpactLevel computedValue() {
>        ...
>    }
>
> And failing when executing:
>
>
>
> assertThat(this.service(WrapperFactory.class).wrapSkipRules(asset).computedValue(),
> is(impactLevel));
>
>
> With the stacktrace:
>
> org.apache.isis.applib.services.wrapper.HiddenException: Reason: Always
> hidden. Identifier:
> com.xms.framework.architecture.domain.model.Asset#computedValue()
>        at
>
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.toException(DomainObjectInvocationHandler.java:626)
>        at
>
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.notifyListenersAndVetoIfRequired(DomainObjectInvocationHandler.java:594)
>        at
>
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(DomainObjectInvocationHandler.java:578)
>        at
>
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:217)
>        at
>
> org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:52)
>        at
>
> com.xms.framework.architecture.domain.model.business.BusinessProcess_$$_jvsta1_16.computedValue(BusinessProcess_$$_jvsta1_16.java)
>        at
>
> com.xms.framework.architecture.integration.glue.business.old.AssetGlue.the_asset_with_name_has_the_asset_value(AssetGlue.java:113)
>        at ✽.Then the asset with name "EAM-ASS-VAL-010-010 - Business
> Process" should have the asset value
> "null"(com/xms/framework/architecture/integration/specs/base/EAM-ASS-VAL -
> Enterprise Architecture Model - Assets - Valuation.feature:17)
>
>
> Seems there must be a bug regarding actions without params, or something
> strange condition?
>
>
> Thanks,
>
> Oscar
>
>
>
>
>
>
>
> Óscar Bou Bou
> Responsable de Producto
> Auditor Jefe de Certificación ISO 27001 en BSI
> CISA, CRISC, APMG ISO 20000, ITIL-F
>
>    902 900 231 / 620 267 520
>    http://www.twitter.com/oscarbou
>
>    http://es.linkedin.com/in/oscarbou
>
>    http://www.GesConsultor.com <http://www.gesconsultor.com/>
>
>
>
> Este mensaje y los ficheros anexos son confidenciales. Los mismos
> contienen información reservada que no puede ser difundida. Si usted ha
> recibido este correo por error, tenga la amabilidad de eliminarlo de su
> sistema y avisar al remitente mediante reenvío a su dirección electrónica;
> no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
> Su dirección de correo electrónico junto a sus datos personales constan en
> un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de
> mantener el contacto con Ud. Si quiere saber de qué información disponemos
> de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un
> escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente
> dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo -
> 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia).
> Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos
> adjuntos no contengan virus informáticos, y en caso que los tuvieran
> eliminarlos.
>
>
>
>
>
>

Re: wrapSkipRules does not execute action because it's hidden

Posted by GESCONSULTOR - Óscar Bou <o....@gesconsultor.com>.
Hi, Dan.

Created at:

https://issues.apache.org/jira/browse/ISIS-818


Thanks,

Oscar




El 21/06/2014, a las 17:46, Dan Haywood <da...@haywood-associates.co.uk> escribió:

> Definitely sounds like a bug... could you please raise a jira ticket?
> 
> Thx
> Dan
> On 21 Jun 2014 16:20, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
> wrote:
> 
>> 
>> Hi to all.
>> 
>> Some weeks ago a commit introduced to the WrapperFactory the method:
>> 
>> WrapperFactory.wrapSkipRules(domainObject).actionName
>> 
>> that executes the action despite being hidden or disabled.
>> 
>> 
>> Despite working well on most situations, I've just found a case where it
>> fails to execute the action, acting as a "normal" wrap (considering the
>> Disabled and Hidden rules):
>> 
>> 
>> 
>>      // {{ ComputedValue (action)
>>    @Hidden
>>    @XMSAction(locales = @XMSLocale(locale = "es", caption = "Valor
>> Calculado"))
>>    public ImpactLevel computedValue() {
>>        ...
>>    }
>> 
>> And failing when executing:
>> 
>> 
>> assertThat(this.service(WrapperFactory.class).wrapSkipRules(asset).computedValue(),
>> is(impactLevel));
>> 
>> 
>> With the stacktrace:
>> 
>> org.apache.isis.applib.services.wrapper.HiddenException: Reason: Always
>> hidden. Identifier:
>> com.xms.framework.architecture.domain.model.Asset#computedValue()
>>        at
>> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.toException(DomainObjectInvocationHandler.java:626)
>>        at
>> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.notifyListenersAndVetoIfRequired(DomainObjectInvocationHandler.java:594)
>>        at
>> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(DomainObjectInvocationHandler.java:578)
>>        at
>> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:217)
>>        at
>> org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:52)
>>        at
>> com.xms.framework.architecture.domain.model.business.BusinessProcess_$$_jvsta1_16.computedValue(BusinessProcess_$$_jvsta1_16.java)
>>        at
>> com.xms.framework.architecture.integration.glue.business.old.AssetGlue.the_asset_with_name_has_the_asset_value(AssetGlue.java:113)
>>        at ✽.Then the asset with name "EAM-ASS-VAL-010-010 - Business
>> Process" should have the asset value
>> "null"(com/xms/framework/architecture/integration/specs/base/EAM-ASS-VAL -
>> Enterprise Architecture Model - Assets - Valuation.feature:17)
>> 
>> 
>> Seems there must be a bug regarding actions without params, or something
>> strange condition?
>> 
>> 
>> Thanks,
>> 
>> Oscar
>> 
>> 
>> 
>> 
>> 


Óscar Bou Bou
Responsable de Producto
Auditor Jefe de Certificación ISO 27001 en BSI
CISA, CRISC, APMG ISO 20000, ITIL-F

   902 900 231 / 620 267 520
   http://www.twitter.com/oscarbou

   http://es.linkedin.com/in/oscarbou

   http://www.GesConsultor.com 




Este mensaje y los ficheros anexos son confidenciales. Los mismos contienen información reservada que no puede ser difundida. Si usted ha recibido este correo por error, tenga la amabilidad de eliminarlo de su sistema y avisar al remitente mediante reenvío a su dirección electrónica; no deberá copiar el mensaje ni divulgar su contenido a ninguna persona.
Su dirección de correo electrónico junto a sus datos personales constan en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es la de mantener el contacto con Ud. Si quiere saber de qué información disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerlo enviando un escrito al efecto, acompañado de una fotocopia de su D.N.I. a la siguiente dirección: Gesdatos Software, S.L. , Paseo de la Castellana, 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1ºC - 46015 (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje o sus archivos adjuntos no contengan virus informáticos, y en caso que los tuvieran eliminarlos.






Re: wrapSkipRules does not execute action because it's hidden

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Definitely sounds like a bug... could you please raise a jira ticket?

Thx
Dan
On 21 Jun 2014 16:20, "GESCONSULTOR - Óscar Bou" <o....@gesconsultor.com>
wrote:

>
> Hi to all.
>
> Some weeks ago a commit introduced to the WrapperFactory the method:
>
> WrapperFactory.wrapSkipRules(domainObject).actionName
>
> that executes the action despite being hidden or disabled.
>
>
> Despite working well on most situations, I've just found a case where it
> fails to execute the action, acting as a "normal" wrap (considering the
> Disabled and Hidden rules):
>
>
>
>       // {{ ComputedValue (action)
>     @Hidden
>     @XMSAction(locales = @XMSLocale(locale = "es", caption = "Valor
> Calculado"))
>     public ImpactLevel computedValue() {
>         ...
>     }
>
> And failing when executing:
>
>
> assertThat(this.service(WrapperFactory.class).wrapSkipRules(asset).computedValue(),
> is(impactLevel));
>
>
> With the stacktrace:
>
> org.apache.isis.applib.services.wrapper.HiddenException: Reason: Always
> hidden. Identifier:
> com.xms.framework.architecture.domain.model.Asset#computedValue()
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.toException(DomainObjectInvocationHandler.java:626)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.notifyListenersAndVetoIfRequired(DomainObjectInvocationHandler.java:594)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.checkVisibility(DomainObjectInvocationHandler.java:578)
>         at
> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:217)
>         at
> org.apache.isis.core.wrapper.proxy.ProxyInstantiatorForJavassist$1.invoke(ProxyInstantiatorForJavassist.java:52)
>         at
> com.xms.framework.architecture.domain.model.business.BusinessProcess_$$_jvsta1_16.computedValue(BusinessProcess_$$_jvsta1_16.java)
>         at
> com.xms.framework.architecture.integration.glue.business.old.AssetGlue.the_asset_with_name_has_the_asset_value(AssetGlue.java:113)
>         at ✽.Then the asset with name "EAM-ASS-VAL-010-010 - Business
> Process" should have the asset value
> "null"(com/xms/framework/architecture/integration/specs/base/EAM-ASS-VAL -
> Enterprise Architecture Model - Assets - Valuation.feature:17)
>
>
> Seems there must be a bug regarding actions without params, or something
> strange condition?
>
>
> Thanks,
>
> Oscar
>
>
>
>
>