[midPoint] Skip approvelSchema when importing objects
mederly at evolveum.com
Thu Dec 8 19:41:44 CET 2016
I've tried that myself today. You're right - there's no channel there.
It was due to a bug in midPoint, which I've fixed on master branch
If you want to use it for 3.4.x, please cherry-pick it to 3.4-support
branch and build + test the WAR file.
However. I verified that when initiating the operation from GUI, the
channel is really
doing import from resource, I haven't used a custom hook (as you did),
but much simpler approach: specific user template:
In the resource definition:
The template looks like this:
<name>Custom User Template</name>
type="RoleType"/> <!-- role with the auto approval ... -->
But what's important is that when the user was added via "Import from
resource", the workflow hook was /not/ involved at all. The operation
that was executed was a part of the /secondary delta/ - meaning the
delta that was "induced" by another change. In this particular
situation, the cause was the existence of resource object that was
imported. And workflows react only to primary deltas.
What does your custom hook do? Does it modify primary delta? If yes, you
could maybe change it to work with the secondary delta: that would be
cleaner. And, if your hook does only the assignment of a role, it would
be best to replace it by using standard midPoint mechanism for this -
and this is object template.
On 08.12.2016 10:43, Nico Pätzelt-Schäkel wrote:
> Hello Pavol Mederly,
> thanks for the answer. I have checked the output from :
> In both cases (import account as Superuser and request a role via GUI) the output of getChannel is "null".
> I checked the output from midpoint.getCurrentTask() which gives me something like Task(id:1481189325403-0-1, name:null, oid:null).
> If I search the task ID in the server tasks GUI. There is no task or subtask with this taskid.
> Have you any idea why this is the case?
> Kind regards
> midPoint mailing list
> midPoint at lists.evolveum.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the midPoint