function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
yeshabyeshab 

Creating my Own User Provisioning Flow

I have created a flow and implemented apex plugin class. when I try to save this flow as User Provisioning Flow, I get error:

User-added image


Implementation of my plugin class:


 global override Process.PluginDescribeResult buildDescribeCall() {
        
        Process.PluginDescribeResult describeResult = new Process.PluginDescribeResult();
        
        describeResult.inputParameters = new 
            List<Process.PluginDescribeResult.InputParameter>{ 
new Process.PluginDescribeResult.InputParameter('testInputParam',
                    Process.PluginDescribeResult.ParameterType.INTEGER, true),
                
                new Process.PluginDescribeResult.InputParameter('User', 
                    Process.PluginDescribeResult.ParameterType.STRING, true),
            
                new Process.PluginDescribeResult.InputParameter('UserProvAccount',
                    Process.PluginDescribeResult.ParameterType.STRING, true),            
                      
                new Process.PluginDescribeResult.InputParameter('UserProvisioningRequest', 
                    Process.PluginDescribeResult.ParameterType.INTEGER, true)
            }; 
describeResult.outputParameters = new 
            List<Process.PluginDescribeResult.OutputParameter>{ 
                               
                new Process.PluginDescribeResult.OutputParameter('testOutputParam', 
                    Process.PluginDescribeResult.ParameterType.INTEGER),
                
                new Process.PluginDescribeResult.OutputParameter('ExternalUserId', 
                    Process.PluginDescribeResult.ParameterType.STRING),
                    
                new Process.PluginDescribeResult.OutputParameter('ExternalUsername', 
                    Process.PluginDescribeResult.ParameterType.STRING)
          
            };
            
        return describeResult;

​}


not sure what am I missing or what is wrong?
Any pointers/suggestions would be nice.Thank you in advance.

 
James LoghryJames Loghry
The flow is complaining that it thinks your Apex class needs additional input and output parameters.  Thees parameters are missing from the describeResult.inputParameters and describeResult.outputParameters in your Apex you posted.

Either remove your Apex class from your flow and re-add it to your flow, which should refresh and let you pick the smaller set of parameters from your ProcessPlugin class, OR add the required variables to your list of input and output parameters in your Apex class.

Additionally, to make things easier, I would think about porting your Process.Plugin implementation to utiliz the InvocableMethod annotation instead, as that's the desired way now to implement Apex in Flows and Processes.
yeshabyeshab
I changed the class to utilize InvocableMethod annotation. but still getting same error