[midPoint] Urgent: Attribute namespace information is Lost if approval is enabled
Pavol Mederly
mederly at evolveum.com
Tue Mar 31 12:48:09 CEST 2015
Hello Dharmendra,
I strongly believe this is a manifestation of a bug that I've fixed some
time ago. So after upgrading to current master, it should probably work
with your wf aspects.
However, in past few days I've implemented a working set of resource
assignment aspects (see
https://wiki.evolveum.com/display/midPoint/Workflow+configuration;
although with some limitations:
https://jira.evolveum.com/browse/MID-2279). I'm just pushing that.
In my case, the namespace problem is not present. The following
assignment was created after approval of a resource assignment to a user:
<assignment id="1">
<construction>
<resourceRef oid="ef2bc95b-76e0-48e2-86d6-3d4f02d3fafe"
type="c:ResourceType"><!-- Localhost CSVfile --></resourceRef>
<attribute>
<c:ref>*ri:lastname*</c:ref> <!-- note that ri: is defined
earlier in the file -->
<outbound>
<strength>strong</strength>
<expression>
<value>LN1</value>
</expression>
</outbound>
</attribute>
</construction>
<activation>
<administrativeStatus>enabled</administrativeStatus>
</activation>
</assignment>
You can try that. Either with my or with your aspects. If you use your
ones, don't forget to disable addUserResourceAssignmentAspect and
modifyUserResourceAssignmentAspect in workflow configuration.
Best regards,
Pavol
On 31. 3. 2015 12:07, Dharmendra Parakh wrote:
> Hi
>
> We have implemented few custom aspects which creates approval request
> on resource assignment to user and role.
>
> When we enable these aspects and user requests a resource approval
> request is raised appropriately and on approving the user request
> resource is assigned correctly.
>
> Now the problem we see after this assignment if we try to search this
> user/ role using web service, search is failing with following error:
>
> 2015-03-31 14:33:14,270 [] [http-bio-8080-exec-10] WARN
> (org.apache.cxf.phase.PhaseInterceptorChain): Interceptor for
> {http://midpoint.evolveum.com/xml/ns/public/model/model-3}modelWebService#{http://midpoint.evolveum.com/xml/ns/public/model/model-3}searchObjects
> <http://midpoint.evolveum.com/xml/ns/public/model/model-3%7DmodelWebService#%7Bhttp://midpoint.evolveum.com/xml/ns/public/model/model-3%7DsearchObjects>
> has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not generate the XML
> stream caused by: javax.xml.stream.XMLStreamException: Non-default
> namespace can not map to empty URI (as per Namespace 1.0 # 2) in
> XML 1.0 documents.
> at
> org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:94)
> ~[cxf-core-3.0.1.e3.jar:3.0.1.e3]
>
>
> After some research I found that if a resource assignment is going
> through approval cycle somehow midpoint is not storing the namespace
> of assignment attributes. I tried disabling the workflow and namespace
> for every attribute was set correctly.
>
> Without approval:
>
> <assignment id="1">
> <construction>
>
> <attribute>
>
> <ref
> xmlns:qn650="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3">qn650:name</ref>
> <outbound>
> <expression>
> <value>Test1</value>
> </expression>
> </outbound>
> </attribute>
>
> ..............
>
>
> With approval:
>
> <assignment id="1">
> <construction>
>
> <attribute>
>
> <ref>qn650:name</ref>
> <outbound>
> <expression>
> <value>Test2</value>
> </expression>
> </outbound>
> </attribute>
>
> ...................
>
> I think the approval engine is somehow ignoring the namespaces. This
> has broken our solution so i request you to provide some quick
> solution/workaround if possible.
>
>
>
> Regards
> Dharmendra
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150331/3d59a73e/attachment.htm>
More information about the midPoint
mailing list