populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(initialAction), Collections.EMPTY_LIST);
populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(initialAction), Collections.EMPTY_LIST, ps);
    public long initialize(String workflowName, int initialAction, Map inputs) throws InvalidRoleException, InvalidInputException, WorkflowException {        WorkflowDescriptor wf = getConfiguration().getWorkflow(workflowName);        WorkflowStore store = getPersistence();        WorkflowEntry entry = store.createEntry(workflowName);        // start with a memory property set, but clone it after we have an ID        PropertySet ps = store.getPropertySet(entry.getId());        Map transientVars = new HashMap();        if (inputs != null) {            transientVars.putAll(inputs);        }        populateTransientMap(entry, transientVars, wf.getRegisters(), new Integer(initialAction), Collections.EMPTY_LIST);        if (!canInitialize(workflowName, initialAction, transientVars, ps)) {            context.setRollbackOnly();            throw new InvalidRoleException("You are restricted from initializing this workflow");        }        ActionDescriptor action = wf.getInitialAction(initialAction);        try {            transitionWorkflow(entry, Collections.EMPTY_LIST, store, wf, action, transientVars, inputs, ps);        } catch (WorkflowException e) {            context.setRollbackOnly();            throw e;        }        long entryId = entry.getId();        // now clone the memory PS to the real PS        //PropertySetManager.clone(ps, store.getPropertySet(entryId));        return entryId;    }