My State Machine project works fine in studio, but while trying to publish the project to orchestrator I am receiving error message “StateMachine.xaml: StateMachine ‘StateMachine’ must have an initial state.” Studio is connected to Orchestrator.
Have you removed any initialization state in the project.
If possible share the xaml file here, if it doesn’t have any confidential information.
To fix this issue:
- Open the State Machine Workflow: Open the
StateMachine.xaml
in UiPath Studio where you’ve designed your State Machine. - Set Initial State:
- Look for the state you want to be the starting point of your State Machine.
- Right-click on that state and select “Set as Start Node”. This designates your selected state as the initial state.
- Save and Validate:
- Save your workflow.
- Validate the workflow to ensure there are no other errors.
- Publish Again:
- Try to publish your project to Orchestrator once more.
Hey @Jayasree_Jana
It means somehow you have disabled or deleted the initialization state.
State machines must have an initial state and end state otherwise the project cannot be published.
Regards,
Sreejith S S