ما المهمة المجدوَلة؟
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توضِّح المستندات الواردة في هذا القسم كيفية إنشاء المهام المقترَحة
واستخدامها باستخدام خدمة المهام المقترَحة في "التنقّل في خرائط Google". يفترض أنّك familiarizado
بما يلي:
يتوفّر مورد Task
الذي ستستخدمه في كلّ من gRPC و
REST.
في Fleet Engine للمهام المُجدوَلة، تمثّل المهمة نشاطًا للسائق يؤدي
إلى إكمال عملية شحن أو خدمة مجدوَلة للمستهلكين. يمكنك إسناد المهام إلى
مواقع وقوف المركبات التي يجب إكمالها فيها، وتنتقل المركبة
إلى تلك المواقع.
تتضمّن المهمة حالتَين محتملتَين، OPEN
أو CLOSED
. تشير هذه الحالات إلى
ما إذا كانت المهمة نشطة في النظام أم لا. مع تطوّر الرحلة في مهمة
نشطة، يمكنك الإبلاغ عن ذلك إلى Fleet Engine من خلال تعديل نقطة توقف المركبة
المرتبطة بالمهمة، والتي تكون إما ENROUTE أو ARRIVED. بعد أن يُكمِل السائق المهام ويغادر المحطة، عليك إزالة المحطة من قائمة المحطات في المركبة. لمزيد من المعلومات حول
المهام وعلاقتها بالمحطات والمركبات، اطّلِع على
المهام المُجدوَلة في أساسيات Fleet Engine .
مسار مهمة
لتتبُّع كل مهمة في Fleet Engine، عليك أولاً إنشاء Task
عنصر. يُرجى الاطّلاع على gRCP أو REST للاطّلاع على مزيد من المعلومات.
يوضِّح الجدول التالي مثالاً على عملية مُتكاملة لمهمة تم إنشاؤها في
نظامك ومراحل دورة حياتها في Fleet Engine. يفترض هذا الإجراء أنّك قد أعددت
Fleet Engine وأنّ لديك مركبة للمهمة، مع تفعيل تعديلات الموقع الجغرافي
في تطبيق السائق. راجِع حزمة تطوير البرامج (SDK) لسائقي المركبات: المهام المُجدوَلة.
1 |
إنشاء مهام: |
في بداية دورة العمل، ينشئ المُرسِل أو مشرف
الخدمة أولاً بيانًا لمهام التسليم أو الخدمات. من
هناك، ينشئ النظام عناصر المهام باستخدام
CreateTrip مع الحقول المطلوبة، مثل نوع المهمة
والموقع الجغرافي. ويمكن أن يوفّر أيضًا إعدادات أخرى في هذه المرحلة،
مثل النافذة الزمنية المستهدَفة ومشاركة مستوى تقدّم المهمة والسمات
المخصّصة. راجِع مقالة إنشاء مهام الشحن والأدلة ذات الصلة. |
2 |
تحديد موعد المهام |
عند جدولة مهمة للتسليم، يتم إصدار طلب تعديل
لمركبة التسليم، ما يؤدي إلى تعديل عنصر المركبة بقائمة المحطات
التي يجب التنقّل بينها. يمكنك تخصيص قائمة بالمهام التي يجب إكمالها في كل محطة.
اطّلِع على تعديل مهام مركبات التسليم.
|
3 |
تعديل مستوى تقدّم المهمة: |
بعد تعيين المهمة لمحطة تسليم وتفعيلها في Fleet Engine،
يُرسِل نظامك إشعارًا إلى Fleet Engine بشأن مستوى تقدّم المركبة أثناء
الاقتراب من المحطة والوصول إليها وإكمالها. وباستخدام هذه المعلومات، يمكن لمحرك فسيلة
تنفيذ عمليات التوجيه وتعديلات الحالة على أفضل وجه أثناء الرحلة، وكذلك
طوال اليوم للمركبة. اطّلِع على
تعديل حالة محطة المركبات.
|
4 |
مشاركة الرحلات: |
في الوقت نفسه الذي تبدأ فيه المركبة التنقّل النشط ليوم التسليم، يمكنك مشاركة معلومات الرحلة مع الجهات المعنيّة. توفّر أداة Fleet Engine تفاصيل المهام وموقع المركبة
للأطراف المعنية بالطرق التالية:
- معلومات الشحن للمستهلكين من خلال
هذا الحلّ، يمكن للمستهلكين الاطّلاع على حالة الطرد بالإضافة إلى
معلومات الموقع الجغرافي للمركبة التي تسمح لهم بالاطّلاع عليها.
اطّلِع على
مشاركة المستهلكين للمهام المُجدوَلة.
- معلومات عن حالة أسطول المركبات للمشرفين باستخدام
هذا الحلّ، يمكن لمشرفي الأسطول الاطّلاع على المواقع الجغرافية
لمركبات التسليم ومحطات التوقف في أسطولك في الوقت الفعلي تقريبًا.
إذا كان مسار المركبة معروفًا، يعرض عنصر عرض الخريطة رسومًا متحركة
للمركبة أثناء تنقّلها على طول مسارها المتوقّع.
اطّلِع على
مكتبة JavaScript لتتبُّع الأسطول.
|
5 |
أكمِل المهمة. |
يمكنك إنهاء مهام الشحن في محرّك Fleet بالطرق التالية:
- إغلاق المهمة: يشير إغلاق مهمة شحن إلى أنّ هذه المهمة
لم تعُد نشطة.
- ضبط نتيجة المهمة: بعد إغلاق مهمة، يمكنك تحديد ما إذا كانت المهمة ناجحة أو فاشلة للإشارة إلى ما إذا كان قد تم إرسال المحتوى أم لا. يُعدّ هذا الإجراء جزءًا مهمًا من إكمال المهمة بهدف
عرض نتيجة التسليم في تجربة المستهلك وضمان
الفوترة الصحيحة لخدمة Fleet Engine.
تجدر الإشارة إلى أنّ عناصر المهام تظلّ فعالة في Fleet Engine لمدة 7 أيام بغض النظر عن حالتها، تمامًا مثل مركبات التسليم، وبعدها تتم إزالتها.
اطّلِع على إنهاء المهام.
|
تسلسل المهام
يعرض الرسم البياني التالي عملية تفصيلية لدورة حياة المهمة.

الخطوات التالية
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-31 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eThis documentation outlines how to create and manage scheduled tasks, representing driver activities, within the Google Maps Mobility scheduled tasks service.\u003c/p\u003e\n"],["\u003cp\u003eTasks, which can be either OPEN or CLOSED, are assigned to vehicle stops, and their progress is updated as the vehicle travels to and completes these stops.\u003c/p\u003e\n"],["\u003cp\u003eThe lifecycle of a task involves creation, scheduling by assigning to a vehicle stop, updating progress, sharing journey details with stakeholders, and finalization by closing and setting the outcome.\u003c/p\u003e\n"],["\u003cp\u003eFleet Engine provides tools for consumers to track shipment status and for administrators to monitor fleet locations and progress in near real-time.\u003c/p\u003e\n"],["\u003cp\u003eTo successfully use this service, prior familiarity with Fleet Engine, vehicle basics for on-demand services, and task basics for scheduled tasks is assumed.\u003c/p\u003e\n"]]],[],null,["# What is a scheduled task?\n\nThe documentation in this section shows how to create and work with scheduled\ntasks using the Google Maps Mobility scheduled tasks service. It assumes\nfamiliarity with the following:\n\n- **Fleet Engine** : You should be familiar with Fleet Engine implementation details, request mechanisms, and security. For that, see [What is the Fleet\n Engine service?](/maps/documentation/mobility/fleet-engine/essentials) and the security topics in [Set up Fleet Engine](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet).\n- **Vehicles basics** for on-demand services. See [Introduction to vehicles](/maps/documentation/mobility/fleet-engine/essentials/vehicles-intro).\n- **Task basics** for scheduled task services. See [Scheduled tasks](/maps/documentation/mobility/fleet-engine/essentials/tasks-intro)\n\nThe `Task` resource that you'll use is available in both [gRPC](/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#task) and\n[REST](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks).\n\nIn Fleet Engine for scheduled tasks, a task represents a driver activity that\nfulfills a scheduled shipment or service for your consumers. You assign tasks to\nvehicle stop locations where they are to be completed, and the vehicle travels\nto those stops.\n\nA task has two possible states, `OPEN` or `CLOSED`. These states indicate\nwhether the task is active or not in the system. As the journey evolves for an\nactive task, you report this to Fleet Engine by updating the vehicle stop\nassociated with the task, which is either ENROUTE or ARRIVED. Once the driver\ncompletes tasks and leaves the stop, you remove the stop from the list of stops\non the vehicle. For more about\ntasks and their relationship to stops and vehicles, see\n[Scheduled tasks](/maps/documentation/mobility/fleet-engine/essentials/tasks-intro#basic_task_fields) in **Fleet Engine essentials** .\n\nLife of a task\n--------------\n\nIn order to track each task in Fleet Engine, you must first create a `Task`\nentity. See either [gRCP](/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#task) or [REST](/maps/documentation/mobility/fleet-engine/reference/tasks/rest/v1/providers.tasks) for reference.\n\nThe following table describes an example end-to-end flow of a task created in\nyour system and its lifecycle stages in Fleet Engine. It assumes you have set up\nFleet Engine and have a vehicle for the task, with location updates\nenabled in the driver app. See [Driver SDK: Scheduled tasks](/maps/documentation/mobility/driver-sdk/scheduled).\n\n|---|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Create tasks.** | At the beginning of the work cycle, the dispatcher or service administrator first creates a manifest for delivery tasks or services. From there, your system then creates the task entities using `CreateTrip` with required fields, such as the type of task and the location. It can also supply other configurations at this point, such as target time window, sharing task progress, and custom attributes. See [Create shipment tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/create-shipment-tasks) and the related guides. |\n| 2 | **Schedule tasks.** | When you schedule a task for delivery, you issue a delivery vehicle update request, which then updates the vehicle entity with a list of stops to travel. You assign each stop a list of tasks to be completed at the stop. See [Update delivery vehicle tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/update-tasks). |\n| 3 | **Update the task progress.** | Once the task is assigned to a delivery stop and active in Fleet Engine, your system notifies Fleet Engine about the vehicle progress as it approaches, arrives at, and completes the stop. With this information, Fleet Engine can best perform routing and status updates along the journey as well as throughout the day for the vehicle. See [Update vehicle stop status](/maps/documentation/mobility/fleet-engine/journeys/tasks/update-stops). |\n| 4 | **Share journeys.** | At the same time that the vehicle begins active navigation for the delivery day, you can share journey information with interested stakeholders. Fleet Engine makes both task details and vehicle location available to interested stakeholders in the following ways: - **Shipment information for consumers** . With this solution, consumers can see the status of their package along with the vehicle location information you permit them to view. See [Consumer sharing for scheduled tasks](/maps/documentation/mobility/journey-sharing/scheduled). - **Fleet status information for administrators** . With this solution, fleet administrators can visualize the locations of delivery vehicles and their stops in your fleets in near real time. If the route for a vehicle is known, the map view component animates that vehicle as it moves along its predicted path. See the [JavaScript Fleet Tracking library](/maps/documentation/mobility/operations/fleet-tracking). |\n| 5 | **Finalize the task.** | You finalize shipment tasks in Fleet engine in the following ways: - **Close the task**: Closing a shipment task indicates that that task is no longer active. - **Set the task outcome**: Once a task is closed, you indicate either a successful or failed task to indicate if the delivery took place or not. This is an important part of finalizing a task to show the delivery outcome in your consumer experience and to ensure correct billing for the Fleet Engine service. Keep in mind that, like delivery vehicles, task entities remain active within Fleet Engine for 7 days regardless of state, at which point they are removed. See [Finalize tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/finalize-tasks). |\n\nTask sequence flow\n------------------\n\nThe following diagram shows a detailed flow of a task lifecycle.\n\nWhat's next\n-----------\n\n- [Create shipment tasks](/maps/documentation/mobility/fleet-engine/journeys/tasks/create-shipment-tasks)"]]