getting resource attributes
Hi All,
I need to get the resource attributes (like host,port no) from the resource.
I used getobj and getObject method but I am getting errors.
this is the code i am using,
<Action id='0'>
<expression>
<block name='testobj' trace='true'>
<invoke name='getAttribute'>
<invoke name='getObject'>
<ref>:display.session</ref>
<s>Resource</s>
<ref>LDAP</ref>
</invoke>
<s>host</s>
</invoke>
</block>
</expression>
</Action>
but the host value is not returning and also the session is returning a null value.
any help will be appreciated
thanks in advance
# 4
In a workflow, you could do a getView of the resource and then access its attributes.
Or in a form you could use the below
<invoke name='getResourceAttributeVal'>
<invoke name='getObject'>
<ref>:display.session</ref>
<s>Resource</s>
<s>Test Resource</s>
</invoke>
<s>Host</s>
</invoke>
# 5
thanks for the reply
I need to do in workflow.
I did it in workflow, please see the below code, but for Id argument i passed directly the resource name, is it the right way to do.
<Action id='0' name='getResourceView' application='com.waveset.session.WorkflowServices'>
<Argument name='op' value='getView'/>
<Argument name='type' value='Resource'/>
<Argument name='id' value='LDAP'/>
<Argument name='subject' value='$(WF_CASE_OWNER)'/>
<Argument name='authorized' value='true'/>
<Return from='view' to='resourceownerview'/>
</Action>
<Action id='1'>
<expression>
<block name='resview' trace='true'>
<ref>resourceownerview</ref>
</block>
</expression>
</Action>
after running the workflow, the resourceownerview is returning (GenericObject:LDAP). but now i am afraid how to retrive the attributes from this object.
i don't know how to pass expressions for a resource object.
if anybody knows, please do let me know.
thanks in advance