Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
334 views
in Technique[技术] by (71.8m points)

priority-web-sdk - webSdk过程的参数顺序(Parameter order for webSdk procedures)

I need to create some reports using the websdk pertaining to orders and price quotes.

(我需要使用websdk创建一些与订单和报价有关的报告。)

I tried following the documentation but even the example given in the developer portal is lacking a lot of crucial information.

(我尝试遵循文档,但是即使开发人员门户网站中给出的示例也缺少很多关键信息。)

Specifically, I need to work with these two procedures:

(具体来说,我需要使用以下两个过程:)

  • ESH_WWWSHOWORDER3

    (ESH_WWWSHOWORDER3)

  • ESH_WWWSHOWCPROF2

    (ESH_WWWSHOWCPROF2)

I tried writing some logic arround the sample found on https://prioritysoftware.github.io/api/procedure/#Introduction

(我尝试写一些关于https://prioritysoftware.github.io/api/procedure/#Introduction上的示例的逻辑)

const procedure = priority.procStart(PROC_NAME,"R", () => {},customerName, function(procSuccess){
                        logger.info('Proc start OK, received documentOptions');
                        logger.info(JSON.stringify(procSuccess));
                        logger.info('Specifying format...');
                        resolve(new Promise((resolve, reject) => {
                            procSuccess.proc.documentOptions(1,1,2,procSuccess => {
                                logger.info('Received inputFields');
                                logger.info(JSON.stringify(procSuccess));
                                procSuccess.proc.inputFields(1,{ORDNUM: ordernum}, procSuccess => {
                                    logger.info('Received url');
                                    logger.info(JSON.stringify(procSuccess));
                                });
                            }, procError => {
                                reject(procError)
                            })
                        }));
                    }, function(procError){
                        logger.error('Proc start error');
                        logger.error(procError);
                        reject(procError);
                    });
                }).catch(err => {
                    logger.error(err);
                })

Where PROC_NAME is WWWSHOWORDER

(其中PROC_NAME是WWWSHOWORDER)

I am trying to understand what the process is asking of me, but it's not really clear.

(我正在尝试了解流程对我的要求,但是还不清楚。)

I tried supplying some values in the order specified by the documentation but I get errors that are not very descriptive to someone who doesn't know the ins and outs of Priority.

(我尝试按文档指定的顺序提供一些值,但是我得到的错误对于那些不了解优先事项的人不是很能描述。)

The logs look somehting like this

(日志看起来像这样)

 Starting Procedure WWWSHOWORDER
2019-11-26T11:55:31.718Z info: Proc start OK, received documentOptions
2019-11-26T11:55:31.719Z info: {"proc":{"name":"WWWSHOWORDER"},"type":"message","message":"No such Tabula entity"}
2019-11-26T11:55:31.721Z info: Specifying format...
2019-11-26T11:55:32.124Z info: Received inputFields
2019-11-26T11:55:32.125Z info: {"proc":{"name":"WWWSHOWORDER"},"type":"message","message":"Failure to p...

Unfortunately my logs are truncated for some strange reason...

(不幸的是,由于某些奇怪的原因,我的日志被截断了。)

  ask by aradu translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems that you are passing "R" as the second parameter, which means that you are calling for a report.

(似乎您正在传递“ R”作为第二个参数,这意味着您正在调用报告。)

Try passing "P" instead.

(尝试改为传递“ P”。)

Also, what is customerName?

(另外,customerName是什么?)

according to the Web SDK I believe this should be dname: "Internal name of the company in which the procedure is run."

(根据Web SDK,我相信它应该是dname:“运行该程序的公司的内部名称。”)

You can tell that WWWSHOWORDER is a Procedure and not a Report by going to System Management -> Generators -> Procedures -> Procedure Generator and querying for it.

(通过转到系统Management -> Generators -> Procedures -> Procedure Generator并对其进行查询,可以告诉WWWSHOWORDER是过程而不是报告。)

If you find it in the procedure generator - its a procedure (in this case it is a procedure which generates a report), and you should call it with a "P" parameter.

(如果在过程生成器中找到它-它是一个过程(在本例中为生成报告的过程),则应使用“ P”参数进行调用。)

If you find the entity in Management -> Generators -> Reports-> ReportGenerator than its a plain Report and you should call it with the "R" Parameter.

(如果您在Management -> Generators -> Reports-> ReportGenerator找到该实体, Management -> Generators -> Reports-> ReportGenerator不是其普通报告,则应使用“ R”参数对其进行调用。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...