Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

Getting Workflow must be in Published state.

Posted on by 140

Hi Team,

Im trying to create a Bookable Resource Bookings record and while saving im getting "Workflow must be in Published state." Please help on this

pastedimage1607708098988v2.png

Please find the log details below:


Exception Message: Workflow must be in Published state.

ErrorCode: -2147220891
HexErrorCode: 0x80040265

ErrorDetails:
ApiExceptionSourceKey: Plugin/Microsoft.Crm.ObjectModel.WorkflowService
ApiStepKey: 46f6cf4c-14ae-4f1e-98a1-eae99a37e95c
ApiDepthKey: 2
ApiActivityIdKey: 4fb26904-b73f-4596-9859-9e971f87241d
ApiPluginSolutionNameKey: System
ApiStepSolutionNameKey: System
ApiExceptionCategory: ClientError
ApiExceptionMesageName: ExecuteUnpublishedWorkflow
ApiExceptionHttpStatusCode: 400
OperationStatus: 0
SubErrorCode: -2146233088

TraceText:
[Microsoft.Dynamics.FieldService: Microsoft.Dynamics.FieldService.FieldServicePlugin]
[2ca77cea-2599-4669-9990-7ecb34754a3b: Field Service: Create (post-operation) for bookableresourcebooking]
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 20
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: Parent PluginContext Start
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 30
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: PluginContext End
FpsPlugin: Parent PluginContext End
FpsPlugin: PluginContext End
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: InitializePlugin: local
FpsPlugin: ConfigurePluginFlagsSupportInternal()
FpsPlugin: CreateEntityOperation(bookableresourcebooking)
FpsPlugin: Operation type: BookableResourceBookingOperation
FpsPlugin: operation.Initialize()
FpsPlugin: operation.Execute()
FpsPlugin: PluginStage: 20 MessageName: Create
FpsPlugin: Before calling message handler
FpsPlugin: Before
FpsPlugin: BeforeCreate
FpsPlugin: BeforeCreateOrUpdate
FpsPlugin: BookingSetupMetadata: Cache miss for 5 BookingSetupMetadataDB records
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving soft
FpsPlugin: PipelineLocal.Value: Retrieving hard
FpsPlugin: Settings: Retrieving local
FpsPlugin: Settings: Retrieving hard
FpsPlugin: CrmMetadataCache [46611051|203]: REQUEST Timestamp: 8655183!12/11/2020 15:02:29, Metadata:
FpsPlugin: CrmMetadataCache [46611051|203]: RESPONSE Timestamp: 8655183!12/11/2020 15:02:29, Metadata:
FpsPlugin: CrmMetadataCache [46611051|203]: GET Expired: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: CrmMetadataCache [46611051|203]: GET: Result True
FpsPlugin: Settings: Retrieving local
FpsPlugin: After calling message handler
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
Entered ScheduleCommon.Plugins.PreOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
Exiting ScheduleCommon.Plugins.PreOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
Entered Microsoft.Dynamics.CoreServiceScheduling.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
PostOperationBookableResourceBookingCreate Enter
PostOperationBookableResourceBookingCreate Exit since either bookableresourcebooking is null or the IDs dont match.
Exiting Microsoft.Dynamics.CoreServiceScheduling.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 40
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: Parent PluginContext Start
FpsPlugin: PluginContext Start
FpsPlugin: MessageName: Create
FpsPlugin: PrimaryEntityName: bookableresourcebooking
FpsPlugin: PrimaryEntityId: 04847a14-cc3b-eb11-a813-000d3af020c4
FpsPlugin: SecondaryEntityName: none
FpsPlugin: Stage: 30
FpsPlugin: PreEntityImages.Count: 0
FpsPlugin: PostEntityImages.Count: 0
FpsPlugin: UserId: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: InitiatingUserID: a989937b-652d-eb11-bf68-000d3af01f8c
FpsPlugin: IsolationMode: 1
FpsPlugin: Mode: 0
FpsPlugin: OrganizationName: 161344953f3e479ebe9e3e2b9ea57258
FpsPlugin: OrganizationId: 16134495-3f3e-479e-be9e-3e2b9ea57258
FpsPlugin: BusinessUnitId: 2edaae9c-362d-eb11-bf68-000d3af01f8c
FpsPlugin: CorrelationId: a74ba7f4-e68e-4ce8-88c5-b270de383fc3
FpsPlugin: RequestId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: OperationId: 387b60f8-6b79-48c8-a860-10b704793e1a
FpsPlugin: IsInTransaction: True
FpsPlugin: Depth: 1
FpsPlugin: IsExecutingOffline: False
FpsPlugin: PluginContext End
FpsPlugin: Parent PluginContext End
FpsPlugin: PluginContext End
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: PluginLocal.Create, Depth: 1
FpsPlugin: InitializePlugin: local
FpsPlugin: ConfigurePluginFlagsSupportInternal()
FpsPlugin: CreateEntityOperation(bookableresourcebooking)
FpsPlugin: Operation type: BookableResourceBookingOperation
FpsPlugin: operation.Initialize()
FpsPlugin: operation.Execute()
FpsPlugin: PluginStage: 40 MessageName: Create
FpsPlugin: Before calling message handler
FpsPlugin: After
FpsPlugin: AfterCreate
FpsPlugin: AfterCreateOrUpdate
FpsPlugin: Settings: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving soft
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PipelineLocal.Value: Retrieving local
FpsPlugin: PluginLocal.Create, Depth: 2
FpsPlugin: PluginLocal.Dispose, Depth: 2
FpsPlugin: PluginLocal.Create, Depth: 2
FpsPlugin: PluginLocal.Dispose, Depth: 2
FpsPlugin: After calling message handler
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
FpsPlugin: PluginLocal.Dispose, Depth: 1
Entered ScheduleCommon.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c
Exiting ScheduleCommon.Plugins.PostOperationBookableResourceBookingCreate.Execute(), Correlation Id: a74ba7f4-e68e-4ce8-88c5-b270de383fc3, Initiating User: a989937b-652d-eb11-bf68-000d3af01f8c


[Microsoft.Dynamics.FieldService: Microsoft.Dynamics.FieldService.FieldServicePlugin]
[353aaf45-010b-43b2-beb3-9e60ef7c08f4: Field Service: Create (post-operation) for msdyn_fieldservicesystemjob]


[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
[46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]

Activity Id: 4342fd84-ccc0-4fe7-b1c3-2758bff0c34a

  • Verified answer
    Al Iggs Profile Picture
    Al Iggs on at
    RE: Getting Workflow must be in Published state.

    You can also go to the "Solution Health Hub" model-driven app and run a job for the "Field Service" rule set. If you have turned on "Use Enhanced Background Processing" in the FS settings, check if all flows are active. Plus check the workflows as explained in the previous posts.

  • Verified answer
    Pawar Pravin  Profile Picture
    Pawar Pravin 5,227 on at
    RE: Getting Workflow must be in Published state.

    As per the trace log it seems that there is OOB workflow which is in deactivated state. Can you please check it once ?

  • Verified answer
    Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Getting Workflow must be in Published state.

    There would a deactivated child workflow somewhere. You may need to do an advanced find and find any child workflows which are deactivated

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans