A view is nothing but the sum of attributes and hidden fields that needs to shwon or calculated for a form. For example when you want to serch for a user with a partcular accountId, what you get is nothing but teh particular User view with the associated information.If you want to access the user view , the refer it like waveset.view.attrName or global.view.attributeName. Whenever we open a form , we are actually checking out the user view (if it is a User Form) and while submitting , we are actually check in the view. In workflows, with specific activities ,we do the chek out view and check in view. We pass the id for the type of view to be checked in and in teh same way for check out views.
I am a beginner in this field also. I just shared my understanding. For a better understanding go though the Identity Managere deployment guide.
Thanks,
Manila
I have been reading through all of the PDFs and have not found an answer to my question. I know what a view is. I need to gain access to the user view so that I can show some additional user attributes. The form I am on does not have that view visible when I use the BPE debugger to step through things.
What is the best approach? I haven't been able to find any examples anywhere thus far.
If you know the values of the previous fields, then assign them in <Derivation> tag, then you can call that field just using <ref> tag. Example
If you have to field2 is determined by what ever the field1 value, then in the field1 <Derivation> tag, set that value,and then you can call that field1 value by just doing <ref> tag in the field2, make sure you have field1 defined the form before field2
> display an attribute value from one of the resource adapters
to get access to such an attribute I suppose you've included it in the attribute mapping of the RA, then you can get hold of it via
accounts[<your-RA-name>].<attribute_name>
or
accounts[Lighthouse].<attribute_name>
/u
Define a field in the form in the <Derivation> tag use below code
<invoke name='getView'>
<ref>:display.session</ref>
<s>User:userid</s>
<map>
<s>authorized</s>
<s>true</s>
</map>
</invoke>
This will give you user view. I think !!!!!
Thank you so much. That worked. Here is what I did:
<Field name='myview'>
<Derivation>
<invoke name='getView'>
<ref>:display.session</ref>
<s>User:someuserid</s>
<map>
<s>authorized</s>
<s>true</s>
</map>
</invoke>
</Derivation>
</Field>
Then I could use myview to reference the users view in later fields.
I am trying to dynamically generate a view from the logged in user using this code snippet:
<Derivation>
<invoke name='getView'>
<ref>:display.session</ref>
<concat>
<s>User:</s>
<invoke name='getUser'>
<ref>:display.session</ref>
</invoke>
</concat>
<map>
<s>authorized</s>
<s>true</s>
</map>
</invoke>
</Derivation>
But am getting this exception repeatedly until it finally gives me a StackOverflowError:
com.waveset.util.WavesetException: Can't call method getView on class com.waveset.session.LocalSession ==> com.waveset.util.WavesetException: XPRESS exception ==>
com.waveset.util.WavesetException: Can't call method getView on class com.waveset.session.LocalSession ==> java.lang.StackOverflowError:
Any ideas?
Thanks,
Mike K
Try this:
Derivation>
<invoke name='getView'>
<ref>:display.session</ref>
<concat>
<s>User:</s>
<ref>accountId</ref>
</concat>
<map>
<s>authorized</s>
<s>true</s>
</map>
</invoke>
</Derivation>
Hi westhab1,
When you have the view, how do you use it to display a certain attribute of the user?
I've created a label with the following:
<Field name='waveset.email'>
<Display class='Label'>
<Property name='title' value='MyLabel'/>
</Display>
<Derivation>
<invoke name='getView'>
<ref>:display.session</ref>
<concat>
<s>User:</s>
<ref>accountId</ref>
</concat>
<map>
<s>authorized</s>
<s>true</s>
</map>
</invoke>
</Derivation>
</Field>
I wanted to display the email address but in the form generated, its showing the below:
MyLabel:com.waveset.object.GenericObject@10ce397
Any idea?