Hi

Quick question.

How can you provision a resource to a user from the workflow? I have a
workflow, and after creating a user with a rest call, I want, depending on
the path through the workflow, to automatically provision a resource.

I tried this in a workflow step:

        ResourceDAO resourceDAO = CONTEXT.getBean(ResourceDAO.class);
        ExternalResource idp = resourceDAO.find("IDP_RESOURCE");
        SyncopeUser user = (SyncopeUser)
        execution.getVariable(ActivitiUserWorkflowAdapter.SYNCOPE_USER);
        user.addResource(idp);

But after creation the user had no resources. In the past (0.7) we have
used manual propagation, by retrieving the propagation handler from the
context and firing it, but that seems a bit inelegant to me.

What is the preferred solution to this (I think common) scenario?

Jesse van Bekkum

Reply via email to