Actually the tasks are created with that executor for other tenants as well. but not inside the correct tenant domain in the BPS. They are created in carbon.super tenant domain and the related task can be viewed in workflow-admin ui only by login as super user.
following is the reason I think that causes this. In the method jsFunction_addUser() in APIStoreHostObject following code is there to create the workflow WorkflowExecutor userSignUpWFExecutor = WorkflowExecutorFactory.getInstance() .getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_USER_SIGNUP); This WorkflowExecutor is created using carbon.super user configuration information in the registry. In the 'getWorkflowConfigurations()' method in WorkflowExecutorFactory class PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(); is used to get the domain name. (aslo tenant id). So even though there is a different tenant domain, these values do not change. So superuser conf is used and the request is sent to the carbon.super tenant in BPS. not to the tenant's one. So I'm working on passing the correct domain info to this On Wed, Sep 3, 2014 at 9:06 PM, Nuwan Dias <[email protected]> wrote: > On Wed, Sep 3, 2014 at 9:02 PM, Chamila Adhikarinayake <[email protected]> > wrote: > >> Hi all, >> I'm creating user self signup feature for tenant store in API Manager. >> Current api manager provides only self signup facility for carbon.super >> store. To add tenant users, tenant admin has to manually add it through the >> carbon console. >> >> Following parts will be implemented >> >> *UI changes* (see attached images) >> >> 1. enable the sign-up button for tenant user store >> 2. add the domain name extension for the user name field in the user >> registration form. (this is appended to the user name) >> >> *User roles for tenants * >> >> Tenant signup configuration will be moved to the registry location >> '/_system/governance/repository/identity/sign-up-config'. This part is >> already implemented by Shariq for a IS component(See discussion in the >> thread "Provide support for self signup for tenants' APIStores" for more >> info on the configuration). But this resource needed to be created >> manually. So as a part of the implementation, This resource will be added >> with default values when creating a tenant. Default value will be >> >> <SelfSignUp> >> <SignUpDomain>PRIMARY</SignUpDomain> >> <SignUpRole> >> <RoleName>subscriber</RoleName> >> <IsExternalRole>false</IsExternalRole> >> </SignUpRole> >> </SelfSignUp> >> >> >> *Modification to current work-flow for tenant sign-up. * >> >> The current implemented method does not work when >> UserSignUpWSWorkflowExecutor is used in the work-flow. this can be only >> used with tenants signups for superuser. Existing code uses configuration >> in the carbon super user's registry entry >> '/_system/governance/apimgt/applicationdata/workflow-extensions.xml' for >> tenants as well ( see jsFunction_addUser() in >> org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject class. ). When >> registering a tenant user for different tenant, configuration in the >> tenant's workflow-extensions.xml needed to be used. >> >> I have implemented basic functionality[1] as requested by AmilaM (Users >> can signup for tenant stores. But Tenant admin has to manually add the >> registry entry with user roles to the given location. If this entry is not >> there, a default 'identity' user role is assigned to the user. Only >> UserSignUpSimpleWorkflowExecutor for the workflow can be used with this. If >> UserSignUpWSWorkflowExecutor is used to connect to the BPS, the tenant >> approval tasks are not created properly) >> > > Do we know the reason for the tasks of the BPS not being created when the > UserSignUpWSWorkflowExecutor is used? We will need to dig into that IMO. > >> >> [1] https://wso2.org/jira/browse/APIMANAGER-2785 >> >> Comments are highly appreciated >> Thanks, >> Chamila. >> >> -- >> Regards, >> Chamila Adhikarinayake >> Software Engineer >> WSO2, Inc. >> Mobile - +94712346437 >> Email - [email protected] >> > > > > -- > Nuwan Dias > > Associate Tech Lead - WSO2, Inc. http://wso2.com > email : [email protected] > Phone : +94 777 775 729 > -- Regards, Chamila Adhikarinayake Software Engineer WSO2, Inc. Mobile - +94712346437 Email - [email protected]
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
