Hello EpiGurus,
I’m trying to get an old BPM to work again. Something happened during our move to .600, and it no longer works.
The BPM sends an email notification and an attachment. The attachment is created, saved, and pulled from a folder in the shared “EpicorData” folder on our epicor server (on-prem). The attachment is created using a template .txt file in a folder in that EpicorData folder.
For some reason, Epicor cannot access this shared folder or write to it and I’m not sure why. When I look at the permissions on the share, the epicor service account that we have set up in EAC has full permissions for it.
Here’s the error we get in the event viewer:
Ice.Common.EpicorServerException: BPM runtime caught an unexpected exception of ‘UnauthorizedAccessException’ type.
See more info in the Inner Exception section of Exception Details. —> System.UnauthorizedAccessException: Access to the path ‘\EPICOR-SRV600V\EpicorData\Companies\93546\Shortcuts\CorrectiveAction\CorrectiveAction.sysconfig’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter…ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at Epicor.Customization.Bpm.DBEDF708DC2FE7435DBF83F2FFF5B4BF4A.PostTranDirective_EmailAssigneeWLink_AF57C75AF4174E81B4961346C00E6F0C.A002_CustomCodeAction()
at Epicor.Customization.Bpm.DBEDF708DC2FE7435DBF83F2FFF5B4BF4A.PostTranDirective_EmailAssigneeWLink_AF57C75AF4174E81B4961346C00E6F0C.ExecuteCore()
at Epicor.Customization.Bpm.DirectiveBase3.Execute(TParam parameters) in C:\_Releases\ICE\RL10.2.600.0FW\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 146 --- End of inner exception stack trace --- at Epicor.Customization.Bpm.DirectiveBase
3.Execute(TParam parameters) in C:_Releases\ICE\RL10.2.600.0FW\Source\Server\Internal\Lib\Epicor.Customization.Bpm\DirectiveBase.Generic.cs:line 162
at System.Linq.Enumerable.All[TSource](IEnumerable1 source, Func
2 predicate)
at Epicor.Customization.Bpm.CustomizationBase23.Execute(TParam parameters) in C:\_Releases\ICE\RL10.2.600.0FW\Source\Server\Internal\Lib\Epicor.Customization.Bpm\CustomizationBase2.cs:line 87 at Epicor.Customization.Bpm.Standard.MonitoringSessionManager.ProcessCollectedData(IceDataContext db, IRowChangesCollection data, IDirectiveEnabler enabler) in C:\_Releases\ICE\RL10.2.600.0FW\Source\Server\Internal\Lib\Epicor.Customization.Bpm\Standard\MonitoringSessionManager.cs:line 145 at Epicor.Customization.Bpm.Standard.MonitoringSessionManager.FinalizeSession(String sessionId, IceDataContext db) in C:\_Releases\ICE\RL10.2.600.0FW\Source\Server\Internal\Lib\Epicor.Customization.Bpm\Standard\MonitoringSessionManager.cs:line 102 at Epicor.Customization.Bpm.SvcFacadeBase
3.Epicor.Hosting.IBpmReadyService.FinalizeCall(Object state, Boolean fail) in C:_Releases\ICE\RL10.2.600.0FW\Source\Server\Internal\Lib\Epicor.Customization.Bpm\SvcFacadeBase.Generic.cs:line 227
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:_Releases\ICE\UD10.2.600.12FW\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 32
I’m just using System.IO’s File.ReadAllText and File.WriteAllText to access/create the files.
Any input is much appreciated!