Error in scrip task

Hello!

 

I'm trying to make an integration with a digital signature call "Firmamex" and I trying to use the code that they provide in their SDK in a business process but i have error messages that dont let me publish the script task. 

 

This are the errors 

 

 

And this is the code 

 

}
public class Flow
   {
       SignmageSDK.FirmamexServices signmageServices;
       String base64;
       String name;

       public Flow(SignmageSDK.FirmamexServices signmageServices, String base64, String name)
       {
           this.signmageServices = signmageServices;
           this.base64 = base64;
           this.name = name;
       }

       public String request()
       {
           B64_doc b64_doc = new B64_doc { name = name, data = base64 };

           JObject flujoEjemplo = JObject.FromObject(new
           {
               b64_doc = b64_doc,
               stickers = new object[] {
                   new {
                       authority = "SAT",
                       stickerType = "line",
                       dataType = "rfc",
                       data = "ARCX9012226P8",
                       imageType = "hash",
                       email = "jhon@gmail.com",
                       page = "0",
                       rect = new Rect { lx = 226.45f, ly = 355.25f, tx = 397.75f, ty = 413.85f }
                   }
               },
               workflow = new object[] {
                   new {
                       data = "ARCX9012226P8"
                   }
               },
               app2 = true
           });

           String flujoParams = flujoEjemplo.ToString(Formatting.None);
           return signmageServices.request(flujoParams);
       }
   }
};

 

I hope you can help me  to understand why I have that erros, please. 

Like 0

Like

2 comments

Hello, Laura.
Thank you for you question.

Unfortunately, it's hard to understand the source of the problem without proper context. Could you please provide me with the schema of your business process? This would greatly assist me in understanding the situation better and allow me to offer you effective assistance.

Hello Yevhenii 

 

Yes. Here it is the schema of the business process 

 

namespace Terrasoft.Core.Process
{

    using Newtonsoft.Json;
    using SignmageSDK;
    using SignmageSDKCore;
    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Drawing;
    using System.Globalization;
    using System.Text;
    using System.Web;
    using Terrasoft.Common;
    using Terrasoft.Configuration;
    using Terrasoft.Core;
    using Terrasoft.Core.Configuration;
    using Terrasoft.Core.DB;
    using Terrasoft.Core.Entities;
    using Terrasoft.Core.Process;
    using Terrasoft.Core.Process.Configuration;

    #region Class: UsrfirmamexMethodsWrapper

    /// <exclude/>
    public class UsrfirmamexMethodsWrapper : ProcessModel
    {

        public UsrfirmamexMethodsWrapper(Process process)
            : base(process) {
            AddScriptTaskMethod("ScriptTask1Execute", ScriptTask1Execute);
        }

        #region Methods: Private

        private bool ScriptTask1Execute(ProcessExecutingContext context) {
            }
            public class Flow
                {
                    SignmageSDK.FirmamexServices signmageServices;
                    String base64;
                    String name;
            
                    public Flow(SignmageSDK.FirmamexServices signmageServices, String base64, String name)
                    {
                        this.signmageServices = signmageServices;
                        this.base64 = base64;
                        this.name = name;
                    }
            
                    public String request()
                    {
                        B64_doc b64_doc = new B64_doc { name = name, data = base64 };
            
                        JObject flujoEjemplo = JObject.FromObject(new
                        {
                            b64_doc = b64_doc,
                            stickers = new object[] {
                                new {
                                    authority = "SAT",
                                    stickerType = "line",
                                    dataType = "rfc",
                                    data = "ARCX9012226P8",
                                    imageType = "hash",
                                    email = "jhon@gmail.com",
                                    page = "0",
                                    rect = new Rect { lx = 226.45f, ly = 355.25f, tx = 397.75f, ty = 413.85f }
                                }
                            },
                            workflow = new object[] {
                                new {
                                    data = "ARCX9012226P8"
                                }
                            },
                            app2 = true
                        });
            
                        String flujoParams = flujoEjemplo.ToString(Formatting.None);
                        return signmageServices.request(flujoParams);
                    }
                }
            };
        }

        #endregion

    }

    #endregion

}

 

thank you for your help.

Show all comments