<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Oracle神諭

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      284 隨筆 :: 9 文章 :: 106 評論 :: 0 Trackbacks

    Graph Oriented Programming(面向圖形編程)
    Workflow is mostly related to the management of tasks for people. The core focus of a workflow process specifies tasks performed by humans are related to achieve a certain process goal.

    工作流主要是與人們任務的管理相關。一個工作流過程限定被人任務執行的核心焦點是與完成一個確定的流程目標。

    Suspending an execution in java is not possible. Actually, it is possible to suspend and resume a thread in java (with e.g. Object.wait() and Object.notify()). But this does not match the needs for the process wait states because of persistence. Workflow, BPM and orchestration solutions need to persist(持久層) their execution during wait states. In fact, state changes in a process should correspond to transactions on a server. Inbetween those transactions the suspended(暫停的) execution should be persistable in e.g. a database or on the file system.

    Actually, it is not so surprising that java does not have a built-in(內置的) mechansim for suspending and persisting executions. That is because java is built on top of the Von Neumann architecture. This essentially(本質上) comes down to an environment for executing a sequence(序列) of instructions(指令). This article presents a technique for extending the Von Neumann architecture for supporting the suspension and persistence of executions.

    Products in the three fields(領域) have all solved this problem in their own way, from their own perspective(觀點). As a consequence(推理), each solution combined a technique for suspending an execution with a whole lot of other functionalities. This is the fundamental reason why these topics are perceived(察覺、感知到) as confusing(混淆的) and unclear(不清楚的) by the development community.

    圖形表現和開發流程
    The technical ability to suspend an execution creates a very interesting opportunity(機會、時機) : a direct link between the business process and the technical implementation(商業流程和技術實現). The business process is a central part of the requirements specified by the business analyst. Without a mechansim for suspending executions, the implementation of the business process requires a complex translation into a software design. In that case(如果是那樣的話), the developer will have to store the executional state(執行狀態) in some form in the database during wait states. This complexity(復雜性) is added and combined(被結合) with the functional requirements of the business process(商業流程的功能需求).

    The conclusion(結論) is that it would be great if we could find a solution for suspending an execution that is related to the graphical representation of a business process. Many (probably all) of the graphical representations of business processes are based upon a directed graph. Some of the process languages are limited to a tree which is a subset of a directed graph. Those languages are called block structured languages(塊結構語言).

    An important consideration is that the proposed(建議) solution should embrace(包含) iterative(迭代的) development. With UML class diagrams, this is an established(確定的) practice. The analyst(分析家) can draw an analysis model in an UML class diagram. Then the developer takes this model as a starting point and transforms it into a design model. Adding more technical details will result(以...為) in an implementation. Too many proposed solutions ended up in being visual programming environments.

    What is Graph Oriented Programming?(什么是面向圖形編程?)
    Graph oriented programming is a technique for solving problem of suspending and persisting an execution. Because of its limited scope, this technique, is easy to understand and serves as the building block for other functionalities targeted by workflow, BPM and orchestration solutions.

    面向圖表編程是為解決暫停或持久化執行的問題的一種技術。因為它限定的范圍,這種技術,是容易理解并且服務于為其他功能性目標、BPM和orchestration解決方案建造模塊。

    The central idea of Graph Oriented Programming is that a we complement plain imperative(命令) programming with a runtime model for executing graphs. So a graph is specified as part of the software and at runtime, executions of the graph are coupled to the execution of the imperative programmed software.
    面向圖表編程的主要概念是,我們使用運行模式為執行圖表完成清晰的命令程序。所以一個圖表是被限定為軟件的一部分,并且圖表的執行是連接到命令程序軟件的執行。

    A process graph is made up of Nodes and Transitions. Transitions have a direction and connect two nodes in the graph.
    一個流程圖表是由節點和轉變(transitions)組成的.轉變有一個方向并且連接圖表中的兩個節點。

    The graph can be seen as a state machine. Although, the executional model that we will explain here is concrete and has better support for concurrent paths of execution.
    這個圖表可以看做是一個狀態機器。雖然我們這里解釋的執行模式是具體的且更好的為并發路徑執行提供更好的支持。

    The following UML class diagram sketches(大略) how the process elements can be modelled in an UML class diagram. This also shows that a process graph can be represented(表現) as data. The process graph data can be expressed in different formats : XML, java objects, records in a database,...

    The next part is the most difficult part to understand for programmers and technical people. That is because we are specifying an executional model that differs from the well known Von Neumann architecture.


    We define a Token as a path of execution. It's a path of execution within one system.
    我們定義了一個令牌作為執行路徑。它是一個系統中的一個執行路徑。

    Note that an execution of a process can involve multiple concurrent paths of execution. We now define an execution of a process as a tree of tokens. A token has a pointer to a node in the process graph.
    注意:一個流程的執行可以包括多個并發的執行路徑。我們現在定義一個流程的執行作為一個令牌樹。一個令牌做為流程圖表中的一個節點的一個指針。

    The following UML class diagram shows the tree of tokens modelled as a UML class diagram(UML 類圖). This is included to show that an execution of a process can be represented as data. This is actually the crucial(至關重要的) part of making an execution persistable.

    Now, we'll explain how the execution of java can be coupled to the execution of the graph. The next image shows the methods in Node and Transition that are involved in graph execution. To calculate the next state of an execution, we propose(計劃) a modified version of the chain of responsibility pattern(責任鏈模式) as described by the GOF 'Design Patterns' book.

    The Nodes in the graph can represent wait states. During a wait state, a Token points to that Node. Each Token that is in a Node can receive a signal. A Signal can be send to a Token to resume execution after a wait state is finished. This will cause the graph execution to start.

    在圖表中的節點可以表現為等待狀態。在一個等待狀態,一個令牌指向那個節點。在節點中每一個令牌可以接受一個信號。一個信號可以在等待狀態完成后,可以發送一個令牌來重新執行。這將導致圖表執行開始。

    A Signal is the trigger that resumes graph execution. 信號是再繼續圖表執行的觸發器。

    The effect(結果) of this signal is that the Token will leave the node. In case(萬一) the node has more then one leaving transition, the leaving transition has to be specified as part of the signal. Transitions just take a Token to the destination(目的) Node. When a token arrives in a Node, the Node is executed. Each node in the graph is of a specific type that determines(確定) its runtime behaviour. Each node type corresponds to a subclass of Node and the behaviour is implemented in the execute-method.


    The node's execute-method has 2 responsibilities.[節點的執行方法有兩個責任] First, it can perform some business logic, related to the type of the node. [首先,它可以運行一些商業邏輯,關系到節點的類型]E.g. sending a message, updating a database, creating a task for a user,...[例如發送消息,更新數據庫,為用戶創建一個任務,......] And the second responsibility of the node's execute-method is the propagation of the graph execution.[節點執行方法的第二個責任是傳遞圖表的執行]  If the node does not propagate the execution, it behaves as a wait state.[如果這個節點沒有傳遞執行,它將作為一個等待狀態。] It can propagate the token that arrived in the node down(沿著) one of the leaving transitions. Or it can create new Tokens and propagate those down the leaving transitions.

    Graph execution ends when all tokens have entered a wait state.[當所有的令牌都進入等待狀態,圖表執行結束] At that time, the signal has been completely processed and the complete process execution (that is made up of a tree of tokens) enters a new overall(全面的) wait state. At this time, the tree of tokens can be persisted. Each token is now waiting to receive another signal.

    One crucial(至關緊要的) refinement(精要) of this model is necessary : Actions(行為 動作). Actions are pieces of java code that are executed upon events in the process.[actions是在進程中事件之上執行的java代碼片段]  Examples of events are 'leaving a node', 'entering a node' and 'taking a transition'.[示例事件包括“離開一個節點”,"進入一個節點"、“接受一個轉變”]  These are all instantanious events that cannot span(跨越) wait states.

    The refinement of the graph execution model with actions is necessary because this allows the technical developer to add implementation details to the business process, without having to change the graph that was originally(最初) created by the business analyst.

    Now we can summarize how this model solves the traditional problems of workflow, BPM and orchestration solutions.
    Simple API + chain of responsibility: replaces monolithic systems.  簡單API+責任鏈
    Inheriting from Node: gives ultimate(最終) process language power.  從節點中繼承
    Adding ‘invisible’ Actions: gives modelling freedom to the business analysts.  加入不視行為
    Process development cycle: replaces visual programming.  過程開發周期

    posted on 2005-06-07 15:25 java世界暢談 閱讀(985) 評論(0)  編輯  收藏 所屬分類: 工作流
    主站蜘蛛池模板: 免费成人在线观看| 亚洲国产精品视频| 亚洲图片校园春色| 久久国产高潮流白浆免费观看 | 在线a人片天堂免费观看高清| 亚洲国产日韩在线成人蜜芽 | 啦啦啦www免费视频| 国产精品亚洲综合久久| 成人免费看片又大又黄| 亚洲中文字幕无码一去台湾| 免费a级毛片无码a∨蜜芽试看 | 手机永久免费的AV在线电影网| 免费成人av电影| 中文字幕乱码免费看电影| 亚洲精品无码午夜福利中文字幕 | 亚洲乱亚洲乱少妇无码| eeuss免费天堂影院| 亚洲av中文无码乱人伦在线播放 | 嫩草影院免费观看| 激情吃奶吻胸免费视频xxxx| 精品亚洲成α人无码成α在线观看| 国产视频精品免费视频| 亚洲av中文无码乱人伦在线咪咕 | 免费看美女午夜大片| 亚洲精品国产精品乱码视色 | 成视频年人黄网站免费视频| 亚洲成a人无码亚洲成av无码| 亚洲国产高清精品线久久| a级毛片免费在线观看| 亚洲精品自在线拍| 国产成人无码a区在线观看视频免费| 污视频网站免费观看| 亚洲AV色香蕉一区二区| 国产桃色在线成免费视频| 边摸边吃奶边做爽免费视频网站| 亚洲精品乱码久久久久久久久久久久| 久久成人免费电影| 亚洲aⅴ天堂av天堂无码麻豆| 亚洲乱码国产乱码精品精| 好爽又高潮了毛片免费下载| 久久性生大片免费观看性|