Hi John,
Thanks for the answer. I guess I should have been more specific. I want to
loop over them in my workflow and use the log tag to write them out.
Something like:
<process-definition name="research" revision="1.0">
<sequence>
<log-workitem />
</sequence>
<process-definition name="log-workitem">
<sequence>
<log message="log-workitem" />
?????
</sequence>
</process-definition>
</process-definition>
With the log tag I can output a field if I know what attributes are available
in my workitem. But I don't see a way to get the field names from my
workflow. I saw where I can check if a field is defined, but again I have to
know what field I am looking for.
Cheers,
Chris
Am Freitag, 13. Oktober 2006 02:04 schrieb John Mettraux:
> On 10/13/06, chris miner <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I want to log the attributes of a workflow item for debugging purposes,
> > but don't see how to iterate over the attributes defined. Is this
> > possible?
>
> Hi Chris,
>
> you could do the following :
>
> ---8<---
> import java.util.Iterator;
> import openwfe.org.engine.workitem.Attribute;
> import openwfe.org.engine.workitem.InFlowWorkItem;
>
> ...
>
> InFlowWorkItem wi = fetchWiFromGodKnowsWhere();
>
> Iterator it = wi.getAttributes().entrySet().iterator();
>
> // or
>
> it = wi.getAttributes().alphaStringIterator();
> //
> // returns a alphabetically sorted iterator on the keys of the workitem
>
> --->8---
>
> The classes are at :
> http://www.openwfe.org/apidocs/openwfe/org/engine/workitem/MapAttribute.htm
>l
> http://www.openwfe.org/apidocs/openwfe/org/engine/workitem/StringMapAttribu
>te.html
>
> wi.getAttributes() returns an instance of StringMapAttribute, a map
> where all the keys are instances of StringAttribute.
>
> MapAttribute and StringMapAttribute contain convenience methods to
> avoid using StringAttribute directly.
>
>
> Best regards,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenWFE users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/openwfe-users
-~----------~----~----~----~------~----~------~--~---