I am attempting to completely replace the default Case Workflow via code.
I copied nearly the entire default CaseWorkflow code and customized it to my liking. However, I am not able to make the changes display in any way.
Some important bits of code are:
namespace CaseTest
{
using static PX.Data.WorkflowAPI.BoundedTo<CRCaseMaint, CRCase>;
public class CaseWorkflow_CRCaseMaint_Workflow : PXGraphExtension<CRCaseMaint>
{
public static bool IsActive() => true;
public override void Configure(PXScreenConfiguration config)
{PXTrace.WriteInformation("!");
var context = config.GetScreenConfigurationContext<CRCaseMaint, CRCase>();
context.ReplaceScreenConfigurationFor(screen =>
{
return screen
.StateIdentifierIs<CRCase.status>()
.FlowTypeIdentifierIs<CRCase.caseClassID>(true)
.WithFlows(flows =>
{
flows.AddDefault(DefaultCaseFlow);
})
// ....
And the customized workflow:
Workflow.IConfigured DefaultCaseFlow(Workflow.INeedStatesFlow flow)
{
//....
Can anyone see any issues here? I attached the whole code file just in case someone wants to work through it. Just rename the file extension to .cs and it will open in Visual Studio.
Best answer by darylbowman
View original