Trigger a Post Action from Service Connect

Are you launching this .Net function in BPM?  Would you be able to supply the entire .Net code?  This looks like what I am looking for.  Thank you.


On Friday, May 23, 2014 4:51 PM, "ygroups.adamleer@... [vantage]" <vantage@yahoogroups.com> wrote:


 
<div id="ygrps-yiv-1325978839yiv6855849671ygrp-text">
  
  
  <div>I wrote a little .NET utility that can call a few different processes. &nbsp;Basically kick off the process manually in the Epicor client interface, but turn Tracing on first. &nbsp;Then see which Business Object / Method Epicor calls to kick off your process.&nbsp;</div><div><br clear="none"></div><div>For example, One of the processes we kick off with this utility is AutoJobCompletion. &nbsp;</div><div>The Business Object is&nbsp;Epicor.Mfg.Proc.AutoJobCompletion, and the method to call is SubmitToAgent.</div><div><br clear="none"></div><div>You can get an idea for the parameters to set by looking at the trace data, e.g.:</div><div><br clear="none"></div><div><div><br clear="none"></div><div>&lt;tracePacket&gt;</div><div><span class="ygrps-yiv-1325978839yiv6855849671Apple-tab-span" style="white-space:pre;">	</span>&lt;businessObject&gt;Epicor.Mfg.Proc.AutoJobCompletion&lt;/businessObject&gt;</div><div><span class="ygrps-yiv-1325978839yiv6855849671Apple-tab-span"

style=“white-space:pre;”> <methodName>SubmitToAgent</methodName>

<returnType>void</returnType>
<localTime>5/23/2014 15:49:09:0904162 PM</localTime>
<executionTime>59</executionTime>
<parameters>
<parameter name=‘ds’ type=‘AutoJobCompletionDataSet’ ><AutoJobCompletionDataSet xmlns=“http://www.epicor.com/Mfg/100/Proc.AutoJobCompletion/AutoJobCompletion” /></parameter>

<parameter name=‘agentID’ type=‘string’ ><![CDATA[SystemTaskAgent]]></parameter>
<parameter name=‘agentSchedNum’ type=‘int’ ><![CDATA[0]]></parameter>
<parameter name=‘agentTaskNum’ type=‘int’ ><![CDATA[0]]></parameter>
<parameter name=‘maintProgram’ type=‘string’ ><![CDATA[Epicor.Mfg.UI.MRP]]></parameter>
</parameters>
</tracePacket>



In case anyone is interested in how you call these from .NET C#, it looks something like
this:


using Epicor.Mfg.Proc;
using Epicor.Mfg.Core;
using System;
// …

        /// <summary>
        /// Auto Job Completion Process
        /// </summary>
        private static void RunAutoJobCompletion()
        {
            Epicor.Mfg.Proxy.AutoJobCompletionImpl ajc = new Epicor.Mfg.Proxy.AutoJobCompletionImpl(pool);
            var ds = ajc.GetNewParameters();
     
      var param = ds.JobCCParam[0];
            param.LogFile = Settings.Default.Log_AutoComplete;
            param.AgentID = Settings.Default.DefaultSystemAgent;
            param.WorkstationID = Environment.MachineName;
            param.DateFormat = “m/d/yyyy”;
            param.NumericFormat = “,.”;

            ajc.SubmitToAgent(ds, param.AgentID, param.AgentSchedNum, param.AgentTaskNum, “Epicor.Mfg.Proc.AutoJobCompletion”);
        }


</div>
 


<div style="height:0px;color:rgb(255, 255, 255);"></div></div>
#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671 -- #ygrps-yiv-1325978839yiv6855849671ygrp-mkp { border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mkp #ygrps-yiv-1325978839yiv6855849671hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mkp #ygrps-yiv-1325978839yiv6855849671ads {
margin-bottom:10px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mkp .ygrps-yiv-1325978839yiv6855849671ad {
padding:0 0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mkp .ygrps-yiv-1325978839yiv6855849671ad p {
margin:0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mkp .ygrps-yiv-1325978839yiv6855849671ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-sponsor #ygrps-yiv-1325978839yiv6855849671ygrp-lc {
font-family:Arial;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-sponsor #ygrps-yiv-1325978839yiv6855849671ygrp-lc #ygrps-yiv-1325978839yiv6855849671hd {
margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-sponsor #ygrps-yiv-1325978839yiv6855849671ygrp-lc .ygrps-yiv-1325978839yiv6855849671ad {
margin-bottom:10px;padding:0 0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671activity span {
font-weight:700;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671activity span:first-child {
text-transform:uppercase;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671activity span a {
color:#5085b6;text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671activity span span {
color:#ff7900;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671activity span .ygrps-yiv-1325978839yiv6855849671underline {
text-decoration:underline;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671attach div a {
text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671attach img {
border:none;padding-right:5px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671attach label {
display:block;margin-bottom:5px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671attach label a {
text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 blockquote {
margin:0 0 0 4px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671bold {
font-family:Arial;font-size:13px;font-weight:700;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671bold a {
text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 dd.ygrps-yiv-1325978839yiv6855849671last p a {
font-family:Verdana;font-weight:700;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 dd.ygrps-yiv-1325978839yiv6855849671last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 dd.ygrps-yiv-1325978839yiv6855849671last p span.ygrps-yiv-1325978839yiv6855849671yshortcuts {
margin-right:0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671attach-table div div a {
text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671attach-table {
width:400px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671file-title a, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671file-title a:active, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671file-title a:hover, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671file-title a:visited {
text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671photo-title a, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671photo-title a:active, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671photo-title a:hover, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div.ygrps-yiv-1325978839yiv6855849671photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 div#ygrps-yiv-1325978839yiv6855849671ygrp-mlmsg #ygrps-yiv-1325978839yiv6855849671ygrp-msg p a span.ygrps-yiv-1325978839yiv6855849671yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671green {
color:#628c2a;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671MsoNormal {
margin:0 0 0 0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 o {
font-size:0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671photos div {
float:left;width:72px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671photos div div {
border:1px solid #666666;height:62px;overflow:hidden;width:62px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671reco-category {
font-size:77%;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671reco-desc {
font-size:77%;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 .ygrps-yiv-1325978839yiv6855849671replbq {
margin:4px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mlmsg table {
font-size:inherit;font:100%;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mlmsg select, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 input, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mlmsg pre, #ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 code {
font:115% monospace;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mlmsg * {
line-height:1.22em;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-mlmsg #ygrps-yiv-1325978839yiv6855849671logo {
padding-bottom:10px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-msg p a {
font-family:Verdana;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-msg p#ygrps-yiv-1325978839yiv6855849671attach-count span {
color:#1E66AE;font-weight:700;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-reco #ygrps-yiv-1325978839yiv6855849671reco-head {
color:#ff7900;font-weight:700;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-reco {
margin-bottom:20px;padding:0px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-sponsor #ygrps-yiv-1325978839yiv6855849671ov li a {
font-size:130%;text-decoration:none;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-sponsor #ygrps-yiv-1325978839yiv6855849671ov li {
font-size:77%;list-style-type:square;padding:6px 0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-sponsor #ygrps-yiv-1325978839yiv6855849671ov ul {
margin:0;padding:0 0 0 8px;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-text {
font-family:Georgia;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-text p {
margin:0 0 1em 0;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-text tt {
font-size:120%;}

#ygrps-yiv-1325978839 #ygrps-yiv-1325978839yiv6855849671 #ygrps-yiv-1325978839yiv6855849671ygrp-vital ul li:last-child {
border-right:none !important;}
#ygrps-yiv-1325978839



I wrote a Service Connect work flow that adds a Cash Receipt group and transaction and would like to trigger the Post Action to update it.
 
Has anyone been success in calling a procedure from a Service Connect work flow or has developed an alternative method.  I have not gotten any good advice from Epicor on this matter.
 
Thank you in advance for any help you can provide.
I wrote a little .NET utility that can call a few different processes.  Basically kick off the process manually in the Epicor client interface, but turn Tracing on first.  Then see which Business Object / Method Epicor calls to kick off your process. 

For example, One of the processes we kick off with this utility is AutoJobCompletion.  
The Business Object is Epicor.Mfg.Proc.AutoJobCompletion, and the method to call is SubmitToAgent.

You can get an idea for the parameters to set by looking at the trace data, e.g.:


<tracePacket>
<businessObject>Epicor.Mfg.Proc.AutoJobCompletion</businessObject>
<methodName>SubmitToAgent</methodName>
<returnType>void</returnType>
<localTime>5/23/2014 15:49:09:0904162 PM</localTime>
<executionTime>59</executionTime>
<parameters>
<parameter name='ds' type='AutoJobCompletionDataSet' ><AutoJobCompletionDataSet xmlns="http://www.epicor.com/Mfg/100/Proc.AutoJobCompletion/AutoJobCompletion" /></parameter>
<parameter name='agentID' type='string' ><![CDATA[SystemTaskAgent]]></parameter>
<parameter name='agentSchedNum' type='int' ><![CDATA[0]]></parameter>
<parameter name='agentTaskNum' type='int' ><![CDATA[0]]></parameter>
<parameter name='maintProgram' type='string' ><![CDATA[Epicor.Mfg.UI.MRP]]></parameter>
</parameters>
</tracePacket>



In case anyone is interested in how you call these from .NET C#, it looks something like this:


using Epicor.Mfg.Proc;
using Epicor.Mfg.Core;
using System;
// ....

        /// <summary>
        /// Auto Job Completion Process
        /// </summary>
        private static void RunAutoJobCompletion()
        {
            Epicor.Mfg.Proxy.AutoJobCompletionImpl ajc = new Epicor.Mfg.Proxy.AutoJobCompletionImpl(pool);
            var ds = ajc.GetNewParameters();
            var param = ds.JobCCParam[0];
            param.LogFile = Settings.Default.Log_AutoComplete;
            param.AgentID = Settings.Default.DefaultSystemAgent;
            param.WorkstationID = Environment.MachineName;
            param.DateFormat = "m/d/yyyy";
            param.NumericFormat = ",.";

            ajc.SubmitToAgent(ds, param.AgentID, param.AgentSchedNum, param.AgentTaskNum, "Epicor.Mfg.Proc.AutoJobCompletion");
        }