こちらのwebサービスは、スケジュールを中断します。ここでの「中断」とは、定期スケジュールを中断しますが、現在実行中や実行待ちのスケジュールには影響を与えず、将来的に実行される予定のスケジュールを停止します。こちらのwebサービスは、スケジュールを中断します。ここでの「中断」とは、定期スケジュールを中断しますが、現在実行中や実行待ちのスケジュールには影響を与えず、将来的に実行される予定のスケジュールを停止することを意味します。 注意:これは、スケジュールを中断する簡潔な方法です。これは、スケジュールを読み込み、ステータスをfalseに更新して保存をしても達成することができます。注意:これは、スケジュールを中断する簡潔な方法です。これは、スケジュールを読み込み、ステータスをfalseに更新し、保存することでも達成できます。 リクエストパラメーター以下の要素は、こちらのリクエストとともに渡されます。 リクエスト要素 | データ型 | 説明 | LoginId | String | Yellowfin Webサービスの管理者ユーザーIDです。これは、ログインIDの方法に応じて、ユーザーID、または電子メールアドレスになります。 このYellowfinアカウントは、「Yellowfin Webサービス使用権」が有効化されたロールを持ち、デフォルト(プライマリー)組織に所属していなくてはいけません。 | Password | String | 上記アカウントのパスワードです。 | OrgId | Integer | Yellowfin内のデフォルト(プライマリー)組織IDです。常に、「1」に設定します。 | Function | String | Webサービス関数です。こちらは、「PAUSESCHEDULE」に設定します。 | Parameters | String[] | 中断するスケジュールのUUIDです。これは、渡されるパラメーターは配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。中断するスケジュールのUUIDです。これは、渡されるパラメーター配列の最初の要素として設定されなくてはいけません。また、既存のUUIDである必要があります。 |
応答パラメーター返される応答には、これらのパラメーターが含まれます。 応答要素 | データ型 | 説明 | StatusCode | String | Webサービスの呼び出しのステータスです。値の選択肢は、以下の通りです。Webサービス呼び出しのステータスです。値の選択肢は、以下の通りです。 | Schedules | AdministrationSchedule | こちらのオブジェクトは、中断をリクエストするスケジュールの詳細を含みます。 |
手順Javaの例を使用して、こちらの呼び出しを実行するための詳細な手順は、以下を参照してください。 Expand |
---|
| 管理ユーザーとしてのログインと、実行するwebサービスの呼び出しの指定を含む、こちらの関数の基礎的なリクエストから開始します。
Code Block |
---|
| AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId(this.username);
rsr.setPassword(this.password);
// This is the primary organisation
rsr.setOrgId(new Integer(1));
rsr.setFunction("PAUSESCHEDULE"); |
定期スケジュールを中断する既存のスケジュールを指定します。 Code Block |
---|
| // This is the Yellowfin Schedule UUID
String[] parameters ={
"SOME_UUID"
};
rsr.setParameters(parameters); |
リクエストを構成したら、呼び出しを実行します。
Code Block |
---|
| AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
管理サービスを初期化します。実行方法の詳細は、こちらを参照してください。
|
完成例以下は、こちらのwebサービスの呼び出しの完成例です。こちらを使用するには、以下の手順に従います。 - コードをコピーして、「ws_pauseschedule.jsp」として保存します。
- root(Yellowfin/appserver/webapps/ROOT)フォルダーにファイルを配置します。
- 環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールのUUID値の詳細を調整します。環境に応じて、ホスト、ポート番号、管理ユーザー、スケジュールUUID値の詳細を調整します。
- インターネットブラウザから、「http://<host>:<port>/ws_pauseschedule.jsp」を実行します。
Code Block |
---|
| /*
* PAUSESCHEDULE Example. ws_pauseschedule.jsp
* A more complete example can be found in ws_admin_schedule_management.jsp
*/
<%@ page language="java" contentType="text/html; charset=UTF-8"
<%@ page import="java.text.*"
<%@ page import="java.util.*"
<%@ page import="com.hof.mi.web.service.*"
<%@ page import="com.hof.mi.web.service.schedule.*"
<%@ page import="com.hof.web.form.*"
AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number
AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test"); // change to the password of the above account
rsr.setOrgId(1);
rsr.setFunction("PAUSESCHEDULE");
// existing Schedule UUID to submit for running
String scheduleUUID = "SOME_UUID";
String[] parameters = {
scheduleUUID
};
rsr.setParameters(parameters);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Successfully paused schedule " + scheduleUUID);
AdministrationSchedule updatedSchedule = rs.getSchedule();
out.write("Loaded schedule: " + updatedSchedule.getScheduleUUID() + "<br>");
out.write("Schedule Type: " + updatedSchedule.getScheduleTypeCode() + "<br>");
out.write("Description: " + updatedSchedule.getScheduleDescription() + "<br>");
out.write("Is Active: " + updatedSchedule.isScheduleActive() + "<br>");
out.write("Last Run Status: " + updatedSchedule.getLastRunStatus() + "<br>");
out.write("Last Run Error: " + updatedSchedule.getLastRunError() + "<br>");
out.write("Last Run Date: " + updatedSchedule.getLastRunDateTimeGMT() + "<br>");
out.write("Next Run Date: " + updatedSchedule.getNextRunDateTimeGMT() + "<br>");
// Some schedule types have extra information that you can access, see reference for details
if (schedule instanceof ReportRefreshSchedule) {
ReportRefreshSchedule rrs = (ReportRefreshSchedule)schedule;
out.write("Report To Refresh: " + rrs.getReportId() + "<br>");
}
// these values all have different meanings depending on FrequencyType, see reference for details
out.write("Frequency Type: " + updatedSchedule.getFrequency().getFrequencyTypeCode() + "<br>");
out.write("Frequency Code: " + updatedSchedule.getFrequency().getFrequencyCode() + "<br>");
out.write("Frequency Unit: " + updatedSchedule.getFrequency().getFrequencyUnit() + "<br>");
out.write("Frequency Local Time: " + updatedSchedule.getFrequency().getLocalRunTime() + "<br>");
out.write("Frequency Local Timezone: " + updatedSchedule.getFrequency().getLocalTimezoneCode() + "<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
} |
|