UiPath Documentation
activities
latest
false
Actividades de Integration Service
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Objetos y archivos adjuntos

Utiliza el conector de UiPath para objetos y archivos adjuntos.

Información general​

El propósito de esta guía es ayudarle a crear una muestra de trabajo que utilice las siguientes actividades de ServiceNow:

  • Introducir registro de ServiceNow
  • Obtener registro de ServiceNow
  • Eliminar registro de ServiceNow

Esta muestra funcional le permite verificar rápidamente la conexión a su instancia de ServiceNow y familiarizarse con los tipos de datos de entrada / salida de la actividad.

Después de completar los pasos de esta guía, tendrá una secuencia de automatización que hará lo siguiente:

  1. Establece una conexión con su instancia de ServiceNow.
  2. Crea un nuevo incidente de ServiceNow (Insertar registro).
  3. Recupera el registro y muestra el mensaje de error esperado (Obtener registro, Si).
  4. Elimina el incidente creado (Eliminar registro).

Requisitos previos​

Antes de comenzar:

  1. Completa los pasos de autenticación de ServiceNow.
  2. Un archivo local para adjuntar a un registro de ServiceNow.

Pasos​

Construya su proyecto​

  1. Sigue los pasos descritos en la documentación del conector para establecer una conexión.
  2. Añade la actividad Ámbito de ServiceNow. Selecciona Configurar, selecciona y prueba la conexión deseada y luego selecciona Guardar.
  3. Añade la actividad Insertar registro de ServiceNow dentro de la actividad Ámbito de ServiceNow .
    • Click the Configure button inside the Insert ServiceNow Record activity.
    • In Select Object drop-down list, select Incident.
    • Create and enter a String variable for the sys_id Value (e.g., sysID)
    • Using the Add Single Field textbox, enter short_description. Enter a short_description Value (e.g., "UiPath-Attachment").
    • Click Done.
    • Create and enter a ResponseStatus variable for the ServiceNowStatus value (e.g., insertRecordResponse).
  4. Añade una actividad Escribir línea después de la actividad Insertar registro . Introduce el siguiente texto: "Registro creado: "+insertRecordResponse.Success.ToString+" | sys_id: +sysID (donde sysID es la variable creada para el campo Valor sys_id anterior).

Pruebe su proyecto​

  1. Añade la actividad Obtener registro después de la actividad Eliminar archivo adjunto .
    • Click the Configure button inside the Insert ServiceNow Record activity.
    • In the Select Object drop-down list, select Attachment.
    • In the sys_id Value field, enter the sys_id variable you created for the Insert Record activity.
    • Click Done.
    • Create and enter a ResponseStatus variable for the ServiceNowStatus value (e.g., getRecordResponse).
  2. Añade una actividad Si después de la actividad Obtener registro .
    • In the Condition property, enter getRecordResponse.Success=False And getRecordResponse.Message.Contains("No Record") to determine if the attachment record was successfully deleted by checking the error message (where getRecordResponse is the variable your created for the ServiceNowStatus property above).
    • In the Then statement box, add a Write Line activity. In the Text property, enter "Test passed: "+getRecordResponse.Message.
    • Añade Eliminar registro de ServiceNow después de la actividad Escribir línea .
      • Click the Configure button inside the Add Attachment activity.
      • In the Select Object drop-down list, select Incident.
      • In the Id property, enter the sys_id variable you created for the Insert Record activity (e.g., sysID).
      • Create and enter a ResponseStatus variable for the ServiceNowStatus value (e.g., deleteRecordResponse).
    • Add a Write Line activity after the Delete ServiceNow Record activity. In the Text property, enter "Record deleted: "+deleteRecordResponse.Success.ToString.
    • En el cuadro Sentencia Else , añade una actividad Escribir línea . En la propiedad Texto , introduce "Prueba fallida: +getRecordResponse.Message.
  3. Selecciona Ejecutar y verifica que la ventana de Salida incluya los valores de línea de escritura esperados.

¡Ya está!

  • Información general​
  • Requisitos previos​
  • Pasos​
  • Construya su proyecto​
  • Pruebe su proyecto​

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado