Developer2000内置OPEN_FORM

发布于 2024-10-01 19:08:58 字数 948 浏览 4 评论 0原文

我是Developer2000的新手。 我有一个 Oracle pl/sql 过程(例如 proc_submit_request),它可以获取数千个请求并将它们提交给 dbms_job 调度程序。 dbms_job 的调用

在每个获取的请求的循环内进行编码。

目前,我在 oracle 表单屏幕中有一个按钮(例如“提交”按钮),单击它会调用 proc_submit_request。 这里的问题是......控件不会返回到我的屏幕,直到所有获取的请求都提交到 dbms_job (这需要几个小时才能完成) 屏幕变灰,只出现沙漏,直到过程 proc_submit_request 完成。 proc_submit_appears 返回一条消息到屏幕,告知“XXXX 请求已提交”。

我现在的要求是,一旦用户单击“提交”按钮,屏幕不应再变灰。用户应该能够导航到其他屏幕,而不仅仅是点击提交屏幕,直到调用的过程完成。

我建议运行侦听器(shell 脚本和 perl 内容),它们可以侦听管道中的任何消息并作为后台进程运行请求。 但用户要求我修复应用程序中的问题而不是运行侦听器。

我听说过一些内置的 OPEN_FORM 。 假设我有两个表单,即 Form-1 和 Form-2。 Form-1 使用 OPEN_FORM 调用 Form-2。 现在使用 OPEN_FORM 可以实现以下功能吗?

  1. 在调用 open_form('Form-2',OTHER-ARGUMENTS...) 时,控件必须位于 Form-1 中(即用户不应该知道另一个表单正在打开),而 Form-2 应该调用 proc_submit_request。

  2. 用户必须能够导航到应用程序中的其他屏幕。但 Form-2 必须仍在运行,直到 proc_submit_procedure 完成。

  3. 如果用户关闭(退出)Form-1 会发生什么? Form-2 还会运行吗?

请给我答案或提出一个好的解决方案。

I am a newbie in Developer2000.
I have an Oracle pl/sql procedure (say, proc_submit_request) that fetches thousands of requests and submits them to dbms_job scheduler. The calling of dbms_job is

coded inside a loop for each request fetched.

Currently, i have a button (say, SUBMIT button) in oracle forms screen clicking which calls proc_submit_request.
The problem here is... the control does not return to my screen untill ALL of the requests fetched are submitted to the dbms_job (this takes hours to complete)
The screen grays out and just the hour-glass appears untill the completion of the procedure proc_submit_request.
proc_submit_appears returns a message to screen telling "XXXX requests submitted".

My requirement now is, once the user clicks the SUBMIT button, the screen should no longer gray out. The user should be able to navigate to other screens and not just struck with the submit screen untill the called procedure is completed.

I suggested running listeners (shell scripts and perl stuff) that can listen for any messages in pipe and run requests as back-ground process.
But the user is asking me to fix the issue in the application rather running listeners.

I've heard a little of OPEN_FORM built-in.
Suppose, I have two forms namely Form-1 and Form-2. Form-1 calls Form-2 using OPEN_FORM.
Now are the following things possible using OPEN_FORM?

  1. On calling open_form('Form-2',OTHER-ARGUMENTS...), control must be in Form-1 (i.e. USer should not know that another form is getting opened) and Form-2 should call proc_submit_request.

  2. User must be able to navigate to other screens in the application. But Form-2 must still be running until proc_submit_procedure is completed.

  3. What happens if the user closes (exits) Form-1 ? Will Form-2 be still running?

Please provide me answers or suggest a good solution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

薯片软お妹 2024-10-08 19:08:58

关于 Form-1、Form-2 场景的好想法 - 我不确定这是否可行。但这是一种更简单的方法,无需摸索隐藏和运行内容的协调表单,并在函数实际返回时走到最前面......等等。

重写运行数据库作业的函数以作为AUTONOMOUS_TRANSACTION。查看编译器指令 PRAGMA AUTONOMOUS_TRANSACTION 了解更多详细信息。您必须在数据库函数/包/过程中使用它 - 它对于 Forms 无效(至少 Forms 10,不确定 11)。

然后,您可以将作业结果存储在函数(包变量、表等)中的某个位置,然后将名为 CREATE_TIMER 的内置函数与表单级触发器 WHEN-TIMER-EXPIRED 结合使用 每 10 秒左右检查一次您的存储位置 - 然后您可以向用户显示一条有关作业的消息,并使用 DELETE_TIMER 终止计时器。

Good thought on the Form-1, Form-2 scenario - I'm not sure if that would work or not. But here is a much easier way without having to fumble around with coordinating forms being hidden and running stuff, and coming to the forefront when the function actually returns...etc, etc.

Rewrite your function that runs the database jobs to run as an AUTONOMOUS_TRANSACTION. Have a look at the compiler directive PRAGMA AUTONOMOUS_TRANSACTION for more details on that. You must use this within a database function/package/procedure - it is not valid with Forms (at least forms 10, not sure about 11).

You can then store the jobs result somewhere from your function (package variable, table, etc) and then use the built-in called CREATE_TIMER in conjunction with the form level trigger WHEN-TIMER-EXPIRED to go and check your storage location every 10 seconds or so - you can then display a message to the user about the jobs, and kill the timer using DELETE_TIMER.

烙印 2024-10-08 19:08:58

您可以创建单个 DBMS_JOB 来调用 proc_submit_request。这样,您的表单只需拨打一次电话;所有其他工作的创建将在单独的会话中完成。

You could create a single DBMS_JOB to call proc_submit_request. That way your form will only have to make one call; and the creation of all the other jobs will be done in a separate session.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文