Well, instead of the web.config, I just copied the EFx widgets (see pic earlier today) into a Method Directive, which apparently is a thing you can do…
So here is what I got for code:
Expand if you dare
using Epicor.Data;
using Epicor.Hosting;
using Epicor.Utilities;
using Erp.Contracts;
using Erp.Tables;
using Erp.Tablesets;
using Ice;
using Ice.Contracts;
using Ice.ExtendedData;
using Ice.Tables;
using Ice.Tablesets;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.ServiceModel;
namespace Epicor.Customization.Bpm.BO244CB901FD9E4BABB2EBCF6DCE65EF74
{
internal sealed class ChangePCIDPreProcessingDirective_TestForJose_7A0FBC59A24944C3BCF9141E84D236FE : ChangePCIDDirectiveBase
{
#region Local variables
private System.Guid EmptyGUID;
private System.String EmptyStr;
private System.Boolean boolFalse;
private Erp.Tablesets.InvTransferTableset dsXfer;
private System.String PartNumber;
private System.String FromWhse;
private System.String FromBin;
private System.String ToWhse;
private System.String ToBin;
private System.Decimal Qty;
#endregion // Local variables
public ChangePCIDPreProcessingDirective_TestForJose_7A0FBC59A24944C3BCF9141E84D236FE(ChangePCIDImpl owner, Erp.ErpContext ctx, Epicor.Hosting.Session session)
: base(
owner,
ctx,
session,
new Epicor.Customization.Bpm.DirectiveDescription
{
Id = new Guid("7a0fbc59-a249-44c3-bcf9-141e84d236fe"),
Name = "TestForJose",
Type = Ice.BO.BpMethod.MethodDirectiveType.PreProcessing,
TypeName = "PreProcessing",
VisibilityScope = Ice.BO.BpMethod.DirectiveScope.CompanySpecific,
Company = "29632",
TenantId = null,
})
{
}
protected override void InitializeLocalVariables(bool preparation)
{
this.EmptyGUID = default(System.Guid);
this.EmptyStr = default(System.String);
this.boolFalse = default(System.Boolean);
this.dsXfer = TablesetFactory.Create<Erp.Tablesets.InvTransferTableset>();
this.PartNumber = default(System.String);
this.FromWhse = default(System.String);
this.FromBin = default(System.String);
this.ToWhse = default(System.String);
this.ToBin = default(System.String);
this.Qty = default(System.Decimal);
}
protected override void TeardownLocalVariables()
{
this.EmptyGUID = default(System.Guid);
this.EmptyStr = default(System.String);
this.boolFalse = default(System.Boolean);
this.dsXfer = null;
this.PartNumber = default(System.String);
this.FromWhse = default(System.String);
this.FromBin = default(System.String);
this.ToWhse = default(System.String);
this.ToBin = default(System.String);
this.Qty = default(System.Decimal);
}
protected override bool ExecuteCore()
{
var conditionBlockValue = false;
if (this.BpmFormJump != null)
{
if (this.BpmFormJump.JumpToActionId == "e0b42487-c308-462c-b574-bae23e256a68") goto block003;
if (this.BpmFormJump.JumpToActionId == "a9c60f9c-5bc9-41c8-b260-5c8f586dac7d") goto block004;
if (this.BpmFormJump.JumpToActionId == "ed09756c-f47c-4178-aa9c-d5ac76b60c57") goto block005;
if (this.BpmFormJump.JumpToActionId == "27fc1173-a7c8-4448-8396-c6f08de72476") goto block006;
if (this.BpmFormJump.JumpToActionId == "547b9f71-34aa-41a8-8585-66d4e9567306") goto block007;
if (this.BpmFormJump.JumpToActionId == "7c8c5913-30aa-476e-b1f0-15cf0a31160e") goto block008;
if (this.BpmFormJump.JumpToActionId == "094d8f4b-d7de-4dbb-bde6-fd4273ee256e") goto block009;
if (this.BpmFormJump.JumpToActionId == "f3291100-2389-40a4-9f97-93e171112570") goto block010;
if (this.BpmFormJump.JumpToActionId == "498366bd-af2a-4dd2-b89c-7f9e05efa81a") goto block011;
if (this.BpmFormJump.JumpToActionId == "a84db42a-1266-46af-99f5-9c8359fd2edd") goto block012;
if (this.BpmFormJump.JumpToActionId == "0aee559f-635a-44f7-bcbe-a0693f74c1c8") goto block013;
if (this.BpmFormJump.JumpToActionId == "8450bf81-73cc-4482-9501-a985750bf327") goto block014;
if (this.BpmFormJump.JumpToActionId == "3964dd70-128b-4fd8-ba3c-35d7ed96c7e2") goto block015;
if (this.BpmFormJump.JumpToActionId == "a4d045f4-ae78-4a2f-a50d-3b7ed6e3d92d") goto block016;
if (this.BpmFormJump.JumpToActionId == "47a49b7a-cef5-456b-9a09-3858664e3413") goto block017;
throw new Ice.Common.BusinessObjectException("Unexpected BpmForm jump block");
}
start: // Name = "Empty GUID 1", Id = "4a5ea0c7-2230-4c32-8932-b39c5d710a7c"
this.UseDataFilter = true;
try
{
this.A001_SetArgumentAction();
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block001: // Name = "Empty String 1", Id = "17f98058-2d71-4684-9fe6-3606654ac6e3"
this.UseDataFilter = true;
try
{
this.A002_SetArgumentAction();
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block002: // Name = "False 1", Id = "59e64956-6ea8-4525-a4e5-888a37b5d4af"
this.UseDataFilter = true;
try
{
this.A003_SetArgumentAction();
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block003: // Name = "GetTransferRecord 1", Id = "e0b42487-c308-462c-b574-bae23e256a68"
this.UseDataFilter = true;
try
{
this.A004_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("e0b42487-c308-462c-b574-bae23e256a68");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block004: // Name = "Qty Row Mod 1", Id = "a9c60f9c-5bc9-41c8-b260-5c8f586dac7d"
this.UseDataFilter = false;
try
{
this.A005_CustomCodeAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("a9c60f9c-5bc9-41c8-b260-5c8f586dac7d");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: true);
block005: // Name = "ChangeTransferQty 1", Id = "ed09756c-f47c-4178-aa9c-d5ac76b60c57"
this.UseDataFilter = true;
try
{
this.A006_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("ed09756c-f47c-4178-aa9c-d5ac76b60c57");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block006: // Name = "From Whse RowMod 1", Id = "27fc1173-a7c8-4448-8396-c6f08de72476"
this.UseDataFilter = false;
try
{
this.A007_CustomCodeAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("27fc1173-a7c8-4448-8396-c6f08de72476");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: true);
block007: // Name = "ChangeFromWhse 1", Id = "547b9f71-34aa-41a8-8585-66d4e9567306"
this.UseDataFilter = true;
try
{
this.A008_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("547b9f71-34aa-41a8-8585-66d4e9567306");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block008: // Name = "From Bin RowMod 1", Id = "7c8c5913-30aa-476e-b1f0-15cf0a31160e"
this.UseDataFilter = false;
try
{
this.A009_CustomCodeAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("7c8c5913-30aa-476e-b1f0-15cf0a31160e");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: true);
block009: // Name = "ChangeFromBin 1", Id = "094d8f4b-d7de-4dbb-bde6-fd4273ee256e"
this.UseDataFilter = true;
try
{
this.A010_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("094d8f4b-d7de-4dbb-bde6-fd4273ee256e");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block010: // Name = "To Whse RowMod 1", Id = "f3291100-2389-40a4-9f97-93e171112570"
this.UseDataFilter = false;
try
{
this.A011_CustomCodeAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("f3291100-2389-40a4-9f97-93e171112570");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: true);
block011: // Name = "ChangeToWhse 1", Id = "498366bd-af2a-4dd2-b89c-7f9e05efa81a"
this.UseDataFilter = true;
try
{
this.A012_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("498366bd-af2a-4dd2-b89c-7f9e05efa81a");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block012: // Name = "To Bin Row Mod 1", Id = "a84db42a-1266-46af-99f5-9c8359fd2edd"
this.UseDataFilter = false;
try
{
this.A013_CustomCodeAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("a84db42a-1266-46af-99f5-9c8359fd2edd");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: true);
block013: // Name = "ChangeToBin 1", Id = "0aee559f-635a-44f7-bcbe-a0693f74c1c8"
this.UseDataFilter = true;
try
{
this.A014_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("0aee559f-635a-44f7-bcbe-a0693f74c1c8");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block014: // Name = "MasterInvBinTests 1", Id = "8450bf81-73cc-4482-9501-a985750bf327"
this.UseDataFilter = true;
try
{
this.A015_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("8450bf81-73cc-4482-9501-a985750bf327");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block015: // Name = "PreCommitTransfer 1", Id = "3964dd70-128b-4fd8-ba3c-35d7ed96c7e2"
this.UseDataFilter = true;
try
{
this.A016_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("3964dd70-128b-4fd8-ba3c-35d7ed96c7e2");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
block016: // Name = "Commit Row Mod 1", Id = "a4d045f4-ae78-4a2f-a50d-3b7ed6e3d92d"
this.UseDataFilter = false;
try
{
this.A017_CustomCodeAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("a4d045f4-ae78-4a2f-a50d-3b7ed6e3d92d");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: true);
block017: // Name = "CommitTransfer 1", Id = "47a49b7a-cef5-456b-9a09-3858664e3413"
this.UseDataFilter = true;
try
{
this.A018_InvokeBOMethodAction();
if (this.BpmDataFormIsPublished())
{
this.BpmDataFormSerializeInterimPoint("47a49b7a-cef5-456b-9a09-3858664e3413");
return false;
}
}
catch (Ice.Common.BusinessObjectException ex)
{
this.RememberException(ex);
}
this.RefreshData(matched: false);
finish:
return true;
}
private void A001_SetArgumentAction()
{
this.EmptyGUID = (Guid.NewGuid());
}
private void A002_SetArgumentAction()
{
this.EmptyStr = ("");
}
private void A003_SetArgumentAction()
{
this.boolFalse = (false);
}
private void A004_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
bo.GetTransferRecord(
this.PartNumber,
this.EmptyGUID,
this.EmptyStr,
this.EmptyStr,
out this.boolFalse,
ref this.dsXfer);
}
}
private void A005_CustomCodeAction()
{
dsXfer.InvTrans[0].RowMod= "U";
}
private void A006_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
bo.ChangeTransferQty(
this.Qty,
ref this.dsXfer);
}
}
private void A007_CustomCodeAction()
{
dsXfer.InvTrans[0].RowMod= "U";
}
private void A008_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
bo.ChangeFromWhse(
this.FromWhse,
ref this.dsXfer);
}
}
private void A009_CustomCodeAction()
{
dsXfer.InvTrans[0].RowMod= "U";
}
private void A010_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
bo.ChangeFromBin(
this.FromBin,
ref this.dsXfer);
}
}
private void A011_CustomCodeAction()
{
dsXfer.InvTrans[0].RowMod= "U";
}
private void A012_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
bo.ChangeToWhse(
this.ToWhse,
ref this.dsXfer);
}
}
private void A013_CustomCodeAction()
{
dsXfer.InvTrans[0].RowMod= "U";
}
private void A014_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
bo.ChangeToBin(
this.ToBin,
ref this.dsXfer);
}
}
private void A015_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
System.String arg02;
System.String arg03;
System.String arg04;
System.String arg05;
System.String arg06;
System.String arg07;
bo.MasterInventoryBinTests(
ref this.dsXfer,
out arg02,
out arg03,
out arg04,
out arg05,
out arg06,
out arg07);
}
}
private void A016_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
bo.PreCommitTransfer(
ref this.dsXfer,
out this.boolFalse);
}
}
private void A017_CustomCodeAction()
{
dsXfer.InvTrans[0].RowMod= "U";
}
private void A018_InvokeBOMethodAction()
{
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.InvTransferSvcContract>(this.Db);
if (bo == null)
{
throw new Ice.Common.EpicorServerException("Can't resolve instance of 'Erp:BO:InvTransfer' service.");
}
using (bo)
{
System.String arg02;
System.String arg03;
bo.CommitTransfer(
ref this.dsXfer,
out arg02,
out arg03);
}
}
protected override void StoreVariables(Epicor.Customization.Bpm.ISerializationBufferBuilder builder)
{
builder
.AddVariable("EmptyGUID", this.EmptyGUID)
.AddVariable("EmptyStr", this.EmptyStr)
.AddVariable("boolFalse", this.boolFalse)
.AddVariable("dsXfer", this.dsXfer)
.AddVariable("PartNumber", this.PartNumber)
.AddVariable("FromWhse", this.FromWhse)
.AddVariable("FromBin", this.FromBin)
.AddVariable("ToWhse", this.ToWhse)
.AddVariable("ToBin", this.ToBin)
.AddVariable("Qty", this.Qty);
}
protected override void BpmDataFormRestoreVariables(IReadOnlyDictionary<string, object> variables)
{
this.VerifyNumberOfStoredVariables(10, variables.Count);
this.EmptyGUID = this.GetStoredValue<System.Guid>(variables, "EmptyGUID");
this.EmptyStr = this.GetStoredValue<System.String>(variables, "EmptyStr");
this.boolFalse = this.GetStoredValue<System.Boolean>(variables, "boolFalse");
this.dsXfer = this.GetStoredValue<Erp.Tablesets.InvTransferTableset>(variables, "dsXfer");
this.PartNumber = this.GetStoredValue<System.String>(variables, "PartNumber");
this.FromWhse = this.GetStoredValue<System.String>(variables, "FromWhse");
this.FromBin = this.GetStoredValue<System.String>(variables, "FromBin");
this.ToWhse = this.GetStoredValue<System.String>(variables, "ToWhse");
this.ToBin = this.GetStoredValue<System.String>(variables, "ToBin");
this.Qty = this.GetStoredValue<System.Decimal>(variables, "Qty");
}
}
}
Again, I cannot see the connection to the trace of an inventory transfer or why that would lead me to Ice.Assemblies.ServiceRenderer.GetService
etc.