Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-1213

workitemcontext setAttribute doesn't set the attribute in a work item if the attribute already exists.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Trivial
    • None
    • 3.0 RC4
    • workflow
    • None

    Description

      code like:
      ctx.setAttribute(WorkflowConstants.ATTRIBUTE_ACTION, WorkflowConstants.ACTION_REJECT, Context.LOCAL_SCOPE);

      causes an error log entry:
      magnolia: ERROR info.magnolia.module.workflow.WorkItemContext WorkItemContext.java(setAttribute:87) 15.11.2006 14:39:04 can't set value action

      if executed in the execute(info.magnolia.context.Context) method of a workflow 'command' participant.

      successful code has to look like:
      ctx.removeAttribute(WorkflowConstants.ATTRIBUTE_ACTION, Context.LOCAL_SCOPE);
      ctx.setAttribute(WorkflowConstants.ATTRIBUTE_ACTION, WorkflowConstants.ACTION_REJECT, Context.LOCAL_SCOPE);

      Which is somewhat unexpected.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              modrzyk Nicolas Modrzyk
              chris_miner Chris Miner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD