UiPath Documentation
activities
latest
false
Atividades do Integration Service
Importante :
A tradução automática foi aplicada parcialmente neste conteúdo. A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.

Objetos e anexos

Use o conector UiPath para objetos e anexos.

Visão geral​

O objetivo deste guia é ajudar você a criar uma amostra de trabalho que usa as seguintes atividades do ServiceNow:

  • Inserir Registro do ServiceNow
  • Get ServiceNow Record
  • Delete ServiceNow Record

Este exemplo de trabalho permite que você verifique rapidamente a conexão com sua instância do ServiceNow e se familiarize com os tipos de dados de entrada/saída da atividade.

Depois de concluir as etapas deste guia, você terá uma sequência de automação que faz o seguinte:

  1. Estabelece uma conexão com sua instância do ServiceNow.
  2. Cria um novo incidente no ServiceNow (Inserir Registro).
  3. Recupera o registro e gera a mensagem de erro esperada (Get Record, If).
  4. Exclui o incidente criado (Delete Record).

Pré-requisitos​

Antes de você começar:

  1. Conclua as etapas de Autenticação do ServiceNow.
  2. Um arquivo local para anexar a um registro do ServiceNow.

Etapas​

Crie seu projeto​

  1. Siga as etapas descritas na documentação do conector para estabelecer uma conexão.
  2. Adicione a atividade ServiceNow Scope. Selecione Configurar, selecione e teste a conexão desejada e, em seguida, selecione Salvar.
  3. Adicione a atividade Insert ServiceNow Record dentro da atividade ServiceNow Scope .
    • 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. Adicione uma atividade Write Line após a atividade Insert Record . Insira o seguinte Texto: "Registro criado: "+insertRecordResponse.Success.ToString+" | sys_id: +sysID (onde sysID é a variável criada para o campo Valor de sys_id acima).

Teste seu projeto​

  1. Adicione a atividade Get Record após a atividade Delete Attachment .
    • 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. Adicione uma atividade If após a atividade Get Record .
    • 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.
    • Adicione a atividade Delete ServiceNow Record após a atividade Write Line .
      • 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.
    • Na caixa da instrução Else , adicione uma atividade Write Line . Na propriedade Text , insira "Test vault: +getRecordResponse.Message.
  3. Selecione Executar e verifique se a janela Saída inclui os valores esperados da linha de gravação.

Está feito!

  • Visão geral​
  • Pré-requisitos​
  • Etapas​
  • Crie seu projeto​
  • Teste seu projeto​

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte(opens in new window)

Quer aprender? Academia UiPath(opens in new window)

Tem perguntas? Fórum do UiPath(opens in new window)

Fique por dentro das novidades