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.html
http://www.openwfe.org/apidocs/openwfe/org/engine/workitem/StringMapAttribute.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,

-- 
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to