Replies: 2 comments
-
Sorry, I fucked up the links, it should be this and this I guess |
Beta Was this translation helpful? Give feedback.
0 replies
-
The exception hints on an (unhandled) error with the setup recipe. Do you use a custom setup recipe? BTW you don't need Workflows to create and set up tenants via HTTP. We have web APIs for that, see the https://github.com/Lombiq/Orchard-Core-API-Client project for examples. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey fellas,
I'm currently learning how to use workflows because I want to automatise the creation, setup and configuration of tenants via HTTP request.
First I built a workflow that should do both, creation and setup.
But that didn't work out because the setup task always crashes. I provided name, url prefix, database type (Sqlite) and table prefix for the creation task (which worked out) and name, site name, admin user name, admin email, admin password and table prefix for the setup step.
I left the recipe option empty to keep it simple.
I'm logging the steps and when it comes to the setup task, this happens:
2024-12-17 19:56:19.5796|Default||278b264f-4fb9607be73f3ae5.||OrchardCore.Workflows.Services.WorkflowManager|ERROR|An unhandled error occurred while executing an activity. Workflow ID: '185'. Activity: '44atxcvsbcf21x3n6h8jfajkmt', 'SetupTenantTask'. Putting the workflow in the faulted state. System.NullReferenceException: Object reference not set to an instance of an object. at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary
2 environment, CancellationToken cancellationToken) at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary
2 environment, CancellationToken cancellationToken) at OrchardCore.Setup.Services.SetupService.SetupInternalAsync(SetupContext context) at OrchardCore.Setup.Services.SetupService.SetupAsync(SetupContext context) at OrchardCore.Tenants.Workflows.Activities.SetupTenantTask.ExecuteAsync(WorkflowExecutionContext workflowContext, ActivityContext activityContext) at OrchardCore.Workflows.Services.WorkflowManager.ExecuteWorkflowAsync(WorkflowExecutionContext workflowContext, ActivityRecord activity) at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary2 environment, CancellationToken cancellationToken) at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary
2 environment, CancellationToken cancellationToken) at OrchardCore.Setup.Services.SetupService.SetupInternalAsync(SetupContext context) at OrchardCore.Setup.Services.SetupService.SetupAsync(SetupContext context) at OrchardCore.Tenants.Workflows.Activities.SetupTenantTask.ExecuteAsync(WorkflowExecutionContext workflowContext, ActivityContext activityContext) at OrchardCore.Workflows.Services.WorkflowManager.ExecuteWorkflowAsync(WorkflowExecutionContext workflowContext, ActivityRecord activity)Since I can't find the exact reason why this task crashes, I set up another workflow with only the setup.
There I provide name, site name, admin user name, admin email, admin password, the database type and the table prefix.
At this point, the setup task doesn't crash but it fails, so at least the workflows runs successfully although I don't have a setup tenant.
I also had the problem described https://github.com/OrchardCMS/OrchardCore/issues/6426 and https://github.com/OrchardCMS/OrchardCore/issues/11091 but I can't reproduce it.
So basically my question is:
What is necessary for a workflow to successfully setup a tenant?
Thank you and best regards
Beta Was this translation helpful? Give feedback.
All reactions