Oracle® Fusion Middleware Oracle Business Process Managementユーザーズ・ガイド 11g リリース(11.1.1.6.2) B61408-05 |
|
前 |
次 |
この付録では、プロセス・ワークスペースで「外部アプリケーション」パネルで使用できるカスタマイズされた外部アプリケーションおよびリンクを作成する方法を説明します。プロセス・ワークスペースとワークリスト・アプリケーションの両方で、「タスクの詳細」ペインに表示される列を指定する方法も説明します。
注意: 任意の場所に一時ディレクトリを作成します(例: |
テキスト
Oracle JDeveloperでOracle Application Development Frameworkプロジェクトを作成します。図C-1は、「Fusion Webアプリケーション(ADF)の作成」ダイアログ・ボックスを示しています。
Javaクラスを作成し、WorkspaceCustomisationImpl
という名前を付与します。
ワークリスト・アプリケーションJAR
ファイルを含めます。図C-2は、追加されるBPMワークリスト・コンポーネント・ライブラリを示しています。
カスタマイズ・クラスを作成します。このサンプルのクラスは、受信ボックス列を変更し、外部アプリケーションおよびリンクをカスタマイズします。例として、WorkspaceCustomisationImplとそのコンテンツを次に示します。
package view.customisationimpl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import oracle.bpel.services.workflow.client.IWorkflowServiceClient; import oracle.bpel.services.workflow.runtimeconfig.IRuntimeConfigService; import oracle.bpel.services.workflow.runtimeconfig.model.AttributeLabelTypimport oracle.bpel.services.workflow.runtimeconfig.model.AttributeLabelUsageList;e; import oracle.bpel.services.workflow.runtimeconfig.model.AttributeLabelUsages; import oracle.bpel.services.workflow.verification.IWorkflowContext; import oracle.bpm.ui.customization.CustomLink; import oracle.bpm.ui.customization.IBPMUICustomizations; public class WorkspaceCustomisationImpl implements IBPMUICustomizations { private static Map displayNameMap = new HashMap(); public WorkspaceCustomisationImpl() { displayNameMap.put("instanceId", "Instance Id"); displayNameMap.put("protectedTextAttribute1", "Business Status"); } public List<CustomLink> getCustomGlobalLinks() { CustomLink globalLink1 = new CustomLink("Oracle Home Page", "www.oracle.com", null); CustomLink globalLink2 = new CustomLink("Self Services Application", "http://global-ebusiness.oraclecorp.com/", null); CustomLink globalLink3 = new CustomLink("BUG DB", "https://bug.oraclecorp.com/", null); List<CustomLink> globalLinks = new ArrayList<CustomLink>(); globalLinks.add(globalLink1); globalLinks.add(globalLink2); globalLinks.add(globalLink3); return globalLinks; } public String getColumnNames() { return "title,taskNumber,instanceId,creator,protectedTextAttribute1"; } private static void initDisplayMap(IWorkflowServiceClient client, IWorkflowContext context) { // u can use service to load all label name for text attributes if (displayNameMap == null) { synchronized (String.class) { if (displayNameMap == null) { displayNameMap = new HashMap(); try { IRuntimeConfigService service = client.getRuntimeConfigService(); AttributeLabelUsageList list = service.getAttributeLabelUsages(context, "Text"); List<AttributeLabelUsages> list1 = list.getAttributeLabelUsages(); for (AttributeLabelUsages usage : list1) { AttributeLabelType type = usage.getLabel(); displayNameMap.put(type.getTaskAttribute(), type.getLabelName()); } } catch (Exception exc) { } } } ) public String getColumnDisplayName(IWorkflowServiceClient client, } } } ) public String getColumnDisplayName(IWorkflowServiceClient client, IWorkflowContext context, java.lang.String colName) { public String getColumnDisplayName(IWorkflowServiceClient client, IWorkflowContext context, java.lang.String colName) { initDisplayMap(client, context); return (String)displayNameMap.get(colName); } } initDisplayMap(client, context);
JARデプロイメント・プロファイルを作成します。customer-impl.jar
という名前のJARファイルを作成します。
このファイルを共有ライブラリcustom.client.applib.jar
の一部としてデプロイします。これを行うには、付録D「イメージおよびJARファイルの共有ライブラリJARファイルの一部としてのデプロイ」の説明のとおり、MANIFEST.MF
ファイルと共有ライブラリを更新します。
カスタマイズによっては、その効果をここで確認できます。
プロセス・ワークスペース用のカスタマイズを実行し、外部アプリケーションの作成と「タスクの詳細」ペインでの受信ボックス列の指定のいずれか(あるいはその両方)を実行した場合、次が表示されます: